12-08-2009, 08:42 AM
WM_SETCURSOR - on mouse move and click.
----------------
Function Dialog210
or
Function Dialog85
-----------
nonmodal
Function Dialog86
----------------
Function Dialog210
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Edit 0x54031000 0x200 12 20 90 16 ""
;4 ComboBox 0x54230242 0x0 12 42 96 213 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030109 "" "" ""
str controls = "3 4"
str e3 e4
if(!ShowDialog("" &Dialog210 &controls)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,int h=GetFocus; if(!h or h=hDlg) ret
,int hh=GetParent(h); if(hh!=hDlg) h=hh ;;combo
,str s
,sel GetWinId(h)
,,case [3,4]
,,s.getwintext(h)
,,OnScreenDisplay s 1
,,ret
,case IDCANCEL
ret 1or
Function Dialog85
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Edit 0x54031000 0x200 12 20 90 16 ""
;4 ComboBox 0x54230242 0x0 12 42 96 213 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030109 "" "" ""
str controls = "3 4"
str e3 e4
if(!ShowDialog("" &Dialog85 &controls)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,int-- FieldSelected
,FieldSelected=0
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case [EN_SETFOCUS<<16|3,CBN_SETFOCUS<<16|4]
,FieldSelected=GetWinId(lParam)
,case IDOK
,str s
,sel FieldSelected
,,case [3,4]
,,s.getwintext(id(FieldSelected hDlg))
,,OnScreenDisplay s 1
,,ret
,case IDCANCEL
ret 1-----------
nonmodal
Function Dialog86
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Edit 0x54031000 0x200 12 20 90 16 ""
;4 ComboBox 0x54230242 0x0 12 42 96 213 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030109 "" "" ""
str controls = "3 4"
str e3 e4
hDlg=ShowDialog("" &Dialog86 &controls 0 1)
MessageLoop 2
ret
;messages
sel message
,case WM_INITDIALOG
,int-- FieldSelected
,FieldSelected=0
,case WM_DESTROY
,PostThreadMessage GetCurrentThreadId 2000 0 0
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case [EN_SETFOCUS<<16|3,CBN_SETFOCUS<<16|4]
,FieldSelected=GetWinId(lParam)
,case IDOK
,str s
,sel FieldSelected
,,case [3,4]
,,s.getwintext(id(FieldSelected hDlg))
,,OnScreenDisplay s 1
,,ret
,case IDCANCEL
ret 1