08-11-2014, 01:35 AM
This is a dialog created with an earlier QM version :
Function dialog_with_date_picker_MLO
This is what you get if you save this same dialog with QM Editor of current version 2.4.2 :
Function dialog_with_date_picker_MLO2
Please advice
Best regards
Function dialog_with_date_picker_MLO
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
def DTM_FIRST 0x1000
def DTM_GETSYSTEMTIME (DTM_FIRST + 1)
def DTM_SETSYSTEMTIME (DTM_FIRST + 2)
;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 122 86 "Select ..."
;1 Button 0x54030001 0x4 8 64 48 14 "OK"
;2 Button 0x54030000 0x4 68 64 48 14 "Cancel"
;3 SysDateTimePick32 0x54000000 0x204 6 24 110 14 ""
;5 SysDateTimePick32 0x54000009 0x204 6 44 110 14 ""
;4 Static 0x54000000 0x0 8 4 104 14 "Select Created Date/Time to Start"
;END DIALOG
;DIALOG EDITOR: "" 0x2040200 "" "" "" "
ret
;messages
;
SYSTEMTIME- t_st1 t_st3
sel message
,case WM_INITDIALOG
,DT_Init(hDlg lParam)
,SendMessage(id(3 hDlg) DTM_SETSYSTEMTIME 0 &t_st1)
,SendMessage(id(5 hDlg) DTM_SETSYSTEMTIME 0 &t_st3)
,
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
int ctrlid=wParam&0xFFFF; message=wParam>>16
sel wParam
,case IDOK
,,DT_Ok hDlg
,,SendMessage(id(3 hDlg) DTM_GETSYSTEMTIME 0 &t_st1)
,,SendMessage(id(5 hDlg) DTM_GETSYSTEMTIME 0 &t_st3)
,,ret 1
,case IDCANCEL DT_Cancel hDlg
;,,ret 0
,,end
This is what you get if you save this same dialog with QM Editor of current version 2.4.2 :
Function dialog_with_date_picker_MLO2
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
def DTM_FIRST 0x1000
def DTM_GETSYSTEMTIME (DTM_FIRST + 1)
def DTM_SETSYSTEMTIME (DTM_FIRST + 2)
;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 122 86 "Select ..."
;1 Button 0x54030001 0x4 8 64 48 14 "OK"
;2 Button 0x54030000 0x4 68 64 48 14 "Cancel"
;3 SysDateTimePick32 0x54000000 0x204 6 24 110 14 ""
;5 SysDateTimePick32 0x54000009 0x204 6 44 110 14 ""
;4 Static 0x54000000 0x0 8 4 104 14 "Select Created Date/Time to Start"
;END DIALOG
;DIALOG EDITOR: "" 0x2040200 "" "" "" "
ret
;messages
;
SYSTEMTIME- t_st1 t_st3
sel message
,case WM_INITDIALOG
,DT_Init(hDlg lParam)
,SendMessage(id(3 hDlg) DTM_SETSYSTEMTIME 0 &t_st1)
,SendMessage(id(5 hDlg) DTM_SETSYSTEMTIME 0 &t_st3)
,
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
int ctrlid=wParam&0xFFFF; message=wParam>>16
sel wParam
,case IDOK
,,DT_Ok hDlg
,,SendMessage(id(3 hDlg) DTM_GETSYSTEMTIME 0 &t_st1)
,,SendMessage(id(5 hDlg) DTM_GETSYSTEMTIME 0 &t_st3)
,,ret 1
,case IDCANCEL DT_Cancel hDlg
;,,ret 0
,,end
"
ret
;messages
;
SYSTEMTIME- t_st1 t_st3
sel message
,case WM_INITDIALOG
,DT_Init(hDlg lParam)
,SendMessage(id(3 hDlg) DTM_SETSYSTEMTIME 0 &t_st1)
,SendMessage(id(5 hDlg) DTM_SETSYSTEMTIME 0 &t_st3)
,
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
int ctrlid=wParam&0xFFFF; message=wParam>>16
sel wParam
,case IDOK
,,DT_Ok hDlg
,,SendMessage(id(3 hDlg) DTM_GETSYSTEMTIME 0 &t_st1)
,,SendMessage(id(5 hDlg) DTM_GETSYSTEMTIME 0 &t_st3)
,,ret 1
,case IDCANCEL DT_Cancel hDlg
;,,ret 0
,,end
Please advice
Best regards