Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attach a toolbar to a sizeable child window
#1
I have attached a window trigger toolbar on QM_Editor, which it follows owner accordingly.

Moreover, I would like to attach this toolbar to QM_Code child window, so as to move as class QM_Code child window expands or contracts. I would appreciate any advice.
#2
You can attach toolbars to child windows too.

Macro
Code:
Copy      Help
int hwndChild=id(2210 _hwndqm)
mac "Toolbar37" hwndChild

I never tested it before, and now surprised that it works. But the toolbar does not disappear when the window is minimized. You can use hook function for it.

Function tb_hook_control
Code:
Copy      Help
;/
function# hWnd message wParam lParam

sel message
,case WM_INITDIALOG ;;note: in QM < 2.2.0, this message is not sent. Use WM_CREATE instead.
,SetTimer hWnd 30 1000 0
,
,case WM_TIMER
,Transparent hWnd iif(min(GetAncestor(GetToolbarOwner(hWnd) 2)) 0 256)
,

First line of toolbar:
Toolbar
Code:
Copy      Help
;/hook tb_hook_control
#3
Dear Gintaras,

Excellent, Perfect.

Let me add that in non-QM windows it is actually minimised.

Best Regards
Simos
#4
any way to use this and have the transparent color flag set to b in the toolbar? as is it makes it come back with a background color
#5
Function tb_hook_control
Code:
Copy      Help
;/
function# hWnd message wParam lParam

sel message
,case WM_INITDIALOG ;;note: in QM < 2.2.0, this message is not sent. Use WM_CREATE instead.
,SetTimer hWnd 30 1000 0
,
,case WM_TIMER
,;Transparent hWnd iif(min(GetAncestor(GetToolbarOwner(hWnd) 2)) 0 256)
,Transparent hWnd iif(min(GetAncestor(GetToolbarOwner(hWnd) 2)) 0 255) GetSysColor(COLOR_BTNFACE)
,
#6
ty vm sir that worked Big Grin


Forum Jump:


Users browsing this thread: 2 Guest(s)