Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Toolbar vs Dialog, minimizing and closing with apps
#2
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
Code:
Copy      Help
;/hook ToolbarHookProc2

Function ToolbarHookProc2
Code:
Copy      Help
;/
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
Code:
Copy      Help
;\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


Messages In This Thread

Forum Jump:


Users browsing this thread: 9 Guest(s)