03-24-2009, 11:03 AM
Function Dialog14
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3 4 5 6"
str e3 e4 e5 e6
e3="aaa"
if(!ShowDialog("Dialog14" &Dialog14 &controls)) ret
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;3 Edit 0x54030080 0x200 16 6 96 14 ""
;4 Edit 0x54030080 0x200 16 22 96 14 ""
;5 Edit 0x54030080 0x200 16 38 96 14 ""
;6 Edit 0x54030080 0x200 16 54 96 14 ""
;7 Button 0x5C032000 0x0 16 82 48 14 "Save"
;8 Button 0x54032000 0x0 66 82 48 14 "Start"
;END DIALOG
;DIALOG EDITOR: "" 0x2030009 "*" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case [EN_CHANGE<<16|3,EN_CHANGE<<16|4,EN_CHANGE<<16|5,EN_CHANGE<<16|6] ;;text changed in one of controls 3-6
,EnableWindow id(7 hDlg) 1 ;;enable Save
,
,case 8 ;;Start
,if(IsWindowEnabled(id(7 hDlg))) mes "please save" "" "!"; ret
,mes "started" "" "i"
,
,case 7 ;;Save
,MES m.timeout=1; mes "saving..." "" m
,EnableWindow id(7 hDlg) 0 ;;disable Save
,
,case IDOK
,case IDCANCEL
ret 1