Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Dialog Editor QM 2.4.2
#1
This is a dialog created with an earlier QM version :


Function dialog_with_date_picker_MLO
Code:
Copy      Help
;\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
Code:
Copy      Help
;\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
#2
Thank you. I already fixed this at home. The reason is this line:
DIALOG EDITOR: "" 0x2040200 "" "" "" "
It ends with a non-closed ".
Delete this line or add ".
Dialog Editor changes are still not finished, for example the Events dialog still does not support sub-functions.


Forum Jump:


Users browsing this thread: 1 Guest(s)