Posts: 1,058
Threads: 367
Joined: Oct 2007
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.
Posts: 12,073
Threads: 140
Joined: Dec 2002
You can attach toolbars to child windows too.
Macro
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
;/
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
Posts: 1,058
Threads: 367
Joined: Oct 2007
Dear Gintaras,
Excellent, Perfect.
Let me add that in non-QM windows it is actually minimised.
Best Regards
Simos
Posts: 1,336
Threads: 61
Joined: Jul 2006
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
Posts: 12,073
Threads: 140
Joined: Dec 2002
Function
tb_hook_control
;/
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)
,
Posts: 1,336
Threads: 61
Joined: Jul 2006
ty vm sir that worked