Professional UI Solutions
Site Map   /  Register


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.

Forums » Prof-UIS General Discussion » Toolbars docking to multiple dock rings Collapse All
Subject Author Date
Kevin Murray Apr 17, 2008 - 1:38 PM

I have set up two sets of dockbars, so I guess those are ring 0 and ring 1.  I have dynamic/pinnable windows in ring 1.  However, the first time I drag a toolbar to redock to a side with a dynamic/pinnable window, the toolbar tries to dock below the window in the same ring, causing an ASSERT that it shouldn’t be doing that.  I can ignore the ASSERT, let the window dock.  Then, if I drag that toolbar off ring 1, it will no longer attempt to dock anywhere on ring 1, nor will any other toolbar attempt to dock in ring 1.  Any ideas why this is happening that first time, or how I can prevent it ever happening?


Kevin Murray

Technical Support Apr 18, 2008 - 1:10 PM

We guess your message relates to resizable control bars. Only resizable control bars can be docked into more than one nested layouts (we call them rings). The toolbars is always placed in the most outer ring inside the main frame window. Would you demonstrate how you create and docks all control bars initially (typically it is in the CMainFrame::OnCreate()).

We would also like to provide you with some additional information about resizable control bars. By default CExtControlBar windows are configured for inner rings only. You should dock them into inner rings initially and the user is not able to dock them into outer ring between toolbars. It’s possible to code a CExtControlBar-derived class which is docked into outer ring between toolbars and this is demonstrated in the FixedSizePanels sample where you can see two resizable control bars with IE browser controls inside. These bars look like Visual Studio .NET/2005/2008 panels (though they work like toolbars).

Kevin Murray Apr 21, 2008 - 12:38 PM

Turns out the problem was my CExtDynamicControlBar was docking to the outer ring.  Thus, when I dragged the toolbar it was trying to accomodate both it and the Dynamic control bar in the same ring.  So, wasn’t the toolbar’s fault, it was the auto-hide window not being in the right place.  I figured this out cause I could drag the auto-hide dynamic control bar to another side, and it would work fine.  But if I tried docking it via code, the problem persisted.



Technical Support Apr 22, 2008 - 8:31 AM

You can dock resizable bars into outer rings programmatically. The drag-n-drop algorithm will dock them into inner rings or into tab groups with other resizable bars even if they are also docked programmatically into еру outer ring. But еру outer ring is not for resizable bars by design. You need a special kind of resizable bar like implemented in the FixedSizePanels sample if you want to see it in the outer ring.