10-31-2017, 04:05 AM
Macro Macro1074
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;3 RichEdit20A 0x54233044 0x200 7 0 215 71 ""
;4 Button 0x54032000 0x0 9 77 48 14 "Button"
;END DIALOG
;DIALOG EDITOR: "" 0x2040308 "*" "" "" ""
str controls = "3"
str re3
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,_s="abcd efgh ijkl 12345 pqrst"
,_s.setwintext(id(3 hDlg))
,SendMessage(id(3 hDlg) EM_SETSEL 2 11)
,act id(3 hDlg)
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 4
,SetFocus id(3 hDlg)
,sub.Dialog2
ret 1
#sub Dialog2
function# [hwndOwner]
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
if(!ShowDialog(dd &sub.DlgProc2 0 hwndOwner 128 0 0 0 -1)) ret
ret 1
#sub DlgProc2
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,hid- hDlg
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1