Hi
How do I change the MsgYesNo() to something like MsgYesNoCancel() to accept 3 choices instead of 2 choices.
Thanks
Regards
ACWoo
acwoo1 wrote:The options appear in the MsgYesNoCancel() dislog box is "Yes", "No","Cancel", how do I change it to "Yes", "Relaunch", "Cancel".
How should I write for the above ACTION if(MsgYesNoCancel......
MB_OK
MB_OKCANCEL
MB_ABORTRETRYIGNORE
MB_YESNOCANCEL
MB_YESNO
MB_RETRYCANCEL
MB_CANCELTRYCONTINUE
MB_HELP
@ 150, 170 BTNBMP oBtn1 OF oDlg PIXEL ;
SIZE 60, 30 ;
PROMPT "&Message" FILE c_path + "\images\preview.bmp" 2007 ;
FONT oFont LEFT ;
ACTION ;
MYMSGBOX( oDlg, ;
"There is an error and the process could not be completed."+CRLF+"Please try it once again.", ;
, ; // aOptions
50, ; // Top ( 0 = centered )
50, ; // Left ( 0 = centered )
"Error Message", ; // Title
, ; // xIcon
, ; // nDefault
, ; // aGradient
"marble5.bmp", ; // Bmp-brush
, ; // bAction
, ; // oFont
, ; // cFileRes
oIcon1) //oIcon
LOCAL c_path := CURDRIVE() + ":\" + GETCURDIR()
@ 200, 15 BTNBMP oBtn1 OF oDlg PIXEL ;
SIZE 60, 30 ;
PROMPT "Msg &Error" FILE c_path + "\images\preview.bmp" 2007 ;
FONT oFont LEFT ;
ACTION MYMSGBOX( ;
"There is an error and the process could not be completed."+CRLF+"Please try it once again.", ;
150, ; // 2. Top ( centered Top and Left = 0 )
140, ; // 3. Left
{"&Close"}, ; // 4. aOptions
{"Exit16.bmp"}, ; // 5. aBmps
"Error Message", ; // 6. Title
"X", ; // 7. xIcon
, ; // 8. nDefault
, ; // 9. aGradient
"marble5.bmp", ; // 10. Bmp-brush
, ; // 11. bAction
, ; // 12. oFont
, ; // 13. cFileRes
oIcon1, ; // 14. oIcon
, ; // 15. uVar
, ; // 16. cPict,
, ; // 17. bValid
, ; // 18. lSpinner
, ; // 19. lMeter
, ; // 20. oMeter
, ; // 21. lCancel
CURDRIVE() + ":\" + GETCURDIR() )
..
..
ACTIVATE DIALOG oDlg ;
ON INIT ( DlgInit( oDlg, oFont, cMsg, nTop, nLeft, aOptions, cTitle, nDefault,;
aGradiate, bAction, xIcon, @uVar, cPict, bValid,;
lSpinner, lMeter, oMeter, @lCancel ), ;
IIF( EMPTY(cBrush), Gradiate(oDlg, aGradiate), ;
DrawBrush(oDlg, c_path + "\images\" + cBrush ) ) )
IF oIco # nil
RELEASE ICON oIco
ENDIF
RELEASE FONT oFont
RETURN oDlg:Cargo
// ---- BMP-Brush-function ---------
FUNCTION DrawBrush( oDlg, cBrush )
LOCAL oBrush
IF !FILE( cBrush )
MsgAlert( "File : " + cBrush + CRLF + ;
"does not exist to create" + CRLF + ;
"Brush-Background !", "ATTENTION" )
ELSE
DEFINE BRUSH oBrush FILENAME cBrush
oDlg:SetBrush( oBrush )
oBrush:End()
ENDIF
RETURN nil
FOR nFor := 1 TO LEN(aOptions)
@ nBtnHeight, nBtnOffset + ((nFor-1)*nBtnWidth) BTNBMP aBtns[nFor] OF oDlg ;
SIZE nBtnWidth + 16, oDlg:nGetChrHeight()*2 PIXEL;
NOBORDER ;
PROMPT aOptions[nFor] ;
FILENAME aBmp[nFor] ;
FONT oFont 2007 ;
LEFT
// old Button
// @ nBtnHeight, nBtnOffset + ((nFor-1)*nBtnWidth) ;
// BUTTON aBtns[nFor] PROMPT aOptions[nFor] OF oDlg ;
// PIXEL SIZE nBtnWidth, oDlg:nGetChrHeight()*1.7
nBtnOffset := nBtnOffset + 8
aBtns[nFor]:bAction := GenBlock(oDlg, nFor)
NEXT nFor
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 115 guests