open qm dialog editor
on the dialog editor window select the control(button in this case) you want to execute code from
then click the events buttons.(the lightning icon)
it will open another window
select BN_CLICKED
click ok on that window
it will insert code for that event into the dialog procedure
Then just need to add run code
example with run program and open file two buttons
Function DialogRunOrOpenFile
on the dialog editor window select the control(button in this case) you want to execute code from
then click the events buttons.(the lightning icon)
it will open another window
select BN_CLICKED
click ok on that window
it will insert code for that event into the dialog procedure
Then just need to add run code
example with run program and open file two buttons
Function DialogRunOrOpenFile
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Button 0x54032000 0x0 33 48 48 14 "Run" "click to run or open file"
;4 Button 0x54032000 0x0 144 48 48 14 "Open"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C00 "*" "" "" ""
if(!ShowDialog(dd &sub.DlgProc 0)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 3 ;;Run
,run "$windows$\notepad.exe";; run notepad
,case 4 ;;Open
,run "$qm$\License.txt"
ret 1