Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dialog editor reverse compatibility
#1
I was trying to edit a dialog created with an older version of qm but latest version of qm does not find dialog procedure.Is there a way to fix this? or must i recreate the entire dialog procedure using #sub DlgProc?
#2
Does not find when dialog definition is in other function than dialog procedure. Most old dialogs probably have them in the same function. For others, move dialog definition (BEGIN DIALOG...END DIALOG...DIALOG EDITOR...) to the function where is the dialog procedure. Or use #sub DlgProc.
#3
procedure and definitions are in same function already
#4
Probably some code is not standard, and QM fails to parse.

Tested:
Works:
Function dlg_button4
Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("dlg_button4" &dlg_button4)) ret

;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 Button 0x54032000 0x0 18 16 48 14 "Button3"
;4 Button 0x54032000 0x0 18 36 48 14 "Button4"
;END DIALOG
;DIALOG EDITOR: "" 0x2030300 "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
Works:
Function dlg_button6
Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam

;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 Button 0x54032000 0x0 18 16 48 14 "Button3"
;4 Button 0x54032000 0x0 18 36 48 14 "Button4"
;END DIALOG
;DIALOG EDITOR: "" 0x2030300 "" "" ""

;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
Doesn't:
Function dlg_button5
Code:
Copy      Help
;\Dialog_Editor

if(!ShowDialog("dlg_button5" &dlg_button6)) ret

;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 Button 0x54032000 0x0 18 16 48 14 "Button3"
;4 Button 0x54032000 0x0 18 36 48 14 "Button4"
;END DIALOG
;DIALOG EDITOR: "" 0x2030300 "" "" ""
Doesn't:
Function dlg_button5
Code:
Copy      Help
;\Dialog_Editor

if(!ShowDialog("dlg_button6" &dlg_button6)) ret

;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 Button 0x54032000 0x0 18 16 48 14 "Button3"
;4 Button 0x54032000 0x0 18 36 48 14 "Button4"
;END DIALOG
;DIALOG EDITOR: "" 0x2030300 "" "" ""


Forum Jump:


Users browsing this thread: 1 Guest(s)