|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Neville Franks
|
Jun 30, 2004 - 8:00 PM
|
Hi, On a fresh app install I have two toolbars I want to be docked side by side on the same row. eg. When "if( !CExtControlBar::ProfileBarStateLoad(...))" I have tried: DockControlBar( &m_wndToolBarSearch );
CExtControlBar* pECBSearchTBar = dynamic_cast<CExtControlBar*>( GetControlBar( IDR_SearchTBar ) );
pECBSearchTBar->DockControlBar( &m_wndToolBar, true, false, this ); // Does ASSERT( !IsFixedMode() );
but this a) ASSERT’s and b_ doesn’t work. I’ve also tried the other forms of DockControlBar(). Any suggestions? Thanks, Neville
|
|
Technical Support
|
Jul 1, 2004 - 9:09 AM
|
Dear Neville,
That code won’t work because the CExtControlBar::DockControlBar method can be used with resizable panels only. Instead, please use the CFrameWnd::DockControlBar method to dock any fixed-size control bar like toolbars, menu bars, or fixed-size panels. Here is an example of how you could position the menu bar at the top of the frame window and then dock two toolbars with it (in the next row): DockControlBar(&m_wndMenuBar);
DockControlBar(&m_wndToolBar);
RecalcLayout();
CRect wrAlredyDockedBar;
m_wndToolBar.GetWindowRect( &wrAlredyDockedBar );
wrAlredyDockedBar.OffsetRect( 1, 0 );
DockControlBar(&m_wndToolBar2,
AFX_IDW_DOCKBAR_TOP,&wrAlredyDockedBar);
|
|
Neville Franks
|
Jul 2, 2004 - 1:38 AM
|
Great, Thanks that works.
|
|