10-22-2008, 05:43 AM
Use WS_CHILD with ShowDialog style argument. Also remove WS_POPUP style, either in editor or when calling ShowDialog.
You cannot add child dialogs to windows of other threads.
To autoclose nonchild dialog, the dialog function or some other code must detect when the owner window is closed and then close the dialog.
You can place child dialogs on QM toolbars.
Toolbar
Function ToolbarHookProc2
Function Dialog65
You cannot add child dialogs to windows of other threads.
To autoclose nonchild dialog, the dialog function or some other code must detect when the owner window is closed and then close the dialog.
You can place child dialogs on QM toolbars.
Toolbar
Function ToolbarHookProc2
;/
function# hWnd message wParam lParam
sel message
,case WM_INITDIALOG
,hid id(9999 hWnd)
,ShowDialog("Dialog65" &Dialog65 0 hWnd 1 WS_CHILD WS_POPUP|WS_CAPTION|WS_SYSMENU 0 0 4)
,;the 4 adds 4 pixels at the top where you ca right click or drag the toolbar
,case WM_DESTROY
,
Function Dialog65
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;3 Button 0x54032000 0x0 6 6 48 14 "Button"
;END DIALOG
;DIALOG EDITOR: "" 0x2030003 "" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,mes 1
ret 1