07-22-2018, 11:07 AM
Hello !
Just a quick question :
In this example, i would like for the user to not be able to return to "Dialog1" until he closes "Dialog2"
Can you show me how can i do it ?
Thanks
Macro Dialog1
Just a quick question :
In this example, i would like for the user to not be able to return to "Dialog1" until he closes "Dialog2"
Can you show me how can i do it ?
Thanks
Macro Dialog1
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog1"
;3 Button 0x54032000 0x0 64 40 90 42 "Button"
;4 Static 0x54000000 0x0 88 20 48 13 "Dialog1"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
if(!ShowDialog(dd &sub.Dialog1 0)) ret
#sub Dialog1
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3 ;;Button
,,sub.Dialog2(2)
ret 1
#sub Dialog2
function# [hwndOwner]
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 206 108 "Dialog2"
;3 Static 0x54000001 0x0 16 20 162 80 "You should not be able to return to Dialog1 until this window is closed."
;4 Static 0x54000000 0x0 72 4 48 13 "Dialog 2"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
if(!ShowDialog(dd &sub.DlgProc2 0 hwndOwner)) ret
ret 1
#sub DlgProc2
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
ret 1