Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog - check rather than ok executes if statement
#2
It must be smart dialog.

Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3 4 5 6"
str c3 c4 c5 c6
if(!ShowDialog("Dialog34" &Dialog34 &controls)) ret

;BEGIN DIALOG
;0 "" 0x44 0x0 0 0 133 65 "RadFusion Options"
;3 Button 0x54012003 0x0 4 2 60 14 "1"
;4 Button 0x54012003 0x0 64 2 62 14 "2"
;5 Button 0x54012003 0x0 4 14 54 12 "3"
;6 Button 0x54012003 0x0 64 14 58 12 "4"
;END DIALOG
;DIALOG EDITOR: "" 0x2020104 "" "" ""


ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,if(but(lParam)) out 1
,case 4
,if(but(lParam)) out 2
,case 5
,if(but(lParam)) out 3
,case 6
,if(but(lParam)) out 4
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)