11-15-2007, 08:55 PM
here is an example of what i am talking about
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;BEGIN DIALOG
;0 "" 0x90C80A44 0x190 0 0 89 94 "Form"
;1 Button 0x54030001 0x4 0 82 48 13 "OK"
;3 Button 0x54012003 0x0 0 3 98 15 "1"
;4 Button 0x54012003 0x0 0 20 108 23 "2"
;5 Button 0x54012003 0x0 0 46 108 15 "3"
;6 Button 0x54012003 0x0 0 64 108 15 "4"
;10 Static 0x54000010 0x20000 0 44 94 2 ""
;9 Static 0x54000010 0x20000 2 18 94 1 ""
;8 Static 0x54000010 0x20000 0 62 94 1 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2010901 "" ""
str controls = "3 4 5 6"
str c3 c4 c5 c6
if(!ShowDialog("C_CPUD" &C_CPUD &controls)) ret
ret
;messages
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
;int param=DT_GetParam(hDlg)
sel message
,case WM_INITDIALOG
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 6 ;;<----button4 clicked
,out "#4 is Checked";;;<--- example action
,clo hDlg;; dialog will be closed using this
,case 5 ;;<----button3 clicked
,out "#3 is Checked";;;<--- example action
,clo hDlg;; dialog will be closed using this
,case 4 ;;<----button2 clicked
,out "#2 is Checked";;;<--- example action
,clo hDlg;; dialog will be closed using this
,case 3 ;;<-----button1 clicked
,out "#1 is Checked";;;<--- example action
,clo hDlg;; dialog will be closed using this
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1