Toolbar that can't be resized by user
Hi,
I have a toolbar created as follows.
Code:
if (!m_wndDynamicRuntimeToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | CBRS_TOP
| CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC | WS_DLGFRAME, CRect(0, 0, 0, 0), IDR_DYNAMICRUNTIMETOOLBAR) ||
!m_wndDynamicRuntimeToolBar.LoadToolBar(IDR_DYNAMICRUNTIMETOOLBAR))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
m_wndDynamicRuntimeToolBar.EnableDocking(0);
It has no gripper and shows only the buttons.
The problem is that when you move the mouse on the edges of the toolbar you have the possibility to resize the toolbar.
Does someone know how to prevent the user to be able to resize the toolbar?
Thanks a lot!
Re: Toolbar that can't be resized by user
Your problem is most likly the CBRS_SIZE_DYNAMIC flag. It's purpose is to make the toolbar resizable. Removing it should fix the issue.
Re: Toolbar that can't be resized by user
Hi,
Firstly, Thanks for answering.
But it does not change anything.
I still have the possibility to click on the edges and resize the bar.
Any other ideas, perhaps SubClassing but SubClass what and override what???
Thanks a lot
Re: Toolbar that can't be resized by user
Hi,
removing this flag works thanks, it was somewhere else that there was a mistake.
Thanks it works now
Re: Toolbar that can't be resized by user