need to use DT_GetControls and v attribute onĀ #sub DlgProc
can also do this
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 180 60 "Dialog" "4"
;3 Button 0x54032000 0x0 8 36 48 14 "Button"
;4 Button 0x54012003 0x0 8 16 48 10 "Check"
;1 Button 0x54030001 0x4 64 36 48 14 "OK"
;2 Button 0x54030000 0x4 120 36 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""
str controls = "4"
str c4Che
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc v
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_GetControls hDlg
,int cChecked=val(c4Che); out "Check: %s" iif(cChecked "checked" "unchecked")
,out cChecked
ret 1
can also do this
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 180 60 "Dialog" "4"
;3 Button 0x54032000 0x0 8 36 48 14 "Button"
;4 Button 0x54012003 0x0 8 16 48 10 "Check"
;1 Button 0x54030001 0x4 64 36 48 14 "OK"
;2 Button 0x54030000 0x4 120 36 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""
str controls = "4"
str c4Che
if(!ShowDialog(dd &sub.DlgProc &controls)) 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
,int cChecked=but(id(4 hDlg)); out "Check: %s" iif(cChecked "checked" "unchecked")
,out cChecked
ret 1