In the example it follows, I try to position the cursor at a certain point on the dialog window, for example (10, 10), when the dialog starts. I am afraid it fails. No problem if the dialog is already visible. Any advice is mostly welcome and appreciated. Best regards.
Function Dialog55
Function Dialog55
;Dialog to test Dlg_GoToCtrl
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Edit 0x54030080 0x200 21 5 96 12 ""
;4 Edit 0x54030080 0x200 21 30 96 12 ""
;5 SysDateTimePick32 0x54030000 0x200 21 50 96 12 ""
;6 Edit 0x54030080 0x200 21 72 96 12 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040800 "*" "" "" ""
str controls = "3 4 6"
str e3 e4 e6
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
;,Initial mouse pointer positioning on a dialog control MF
;,www.quickmacros.com/forum/showthread.php?tid=3606&highlight=init*+mous*+dialog*
,mou 10 10 hDlg
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
;OutWinMsg message wParam lParam
sel wParam
,case IDOK
,case IDCANCEL
,
,case [EN_CHANGE<<16|4]
,mou 10 10 hDlg
,
ret 1
Nevertheless, it works if mou is set under WM_PAINT
case WM_PAINT
mou 10 10 hDlg