07-09-2019, 04:50 PM
Function test_return_value
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x54032000 0x0 72 44 86 39 "upon pressing this button, close this dialog and return -77"
;END DIALOG
;DIALOG EDITOR: "" 0x2040601 "*" "" "" ""
ret ShowDialog(dd &sub.DlgProc 0)
#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
,,DT_Ok(hDlg -77)
ret 1