Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SmartDialog vs. Dialog
#1
while testing with dialogs i found a strange behaivor:

this one is recognized as smartdialog:
Dialog2
Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x118 0 0 305 135 "Form"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 RichEdit20A 0x54033040 0x200 4 22 194 14 "url1"
;4 RichEdit20A 0x54033040 0x200 200 22 34 14 "size1"
;5 Edit 0x54030000 0x200 4 4 96 14 "title"
;END DIALOG
;DIALOG EDITOR: "" 0x2010807 "" ""


ret
;messages
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
;int param=DT_GetParam(hDlg)

sel message
,case WM_INITDIALOG
,mov 1700 100 hDlg
,ret 1
,case WM_DROPFILES TO_DropFiles hDlg wParam
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case EN_SETFOCUS<<16|5
,,out "huhu"
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1

when removing:
Dialog2
Code:
Copy      Help
,case EN_SETFOCUS<<16|5
,,out "huhu"

it is not a smartdialog anymore, but with:

Dialog2
Code:
Copy      Help
,;case EN_SETFOCUS<<16|5
,,;out "huhu"

its a smartdialog again.

it took me 20 minutes to find out why my dialog switched back to normal.
pi


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)