Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS General Discussion » Prevent floating state. Collapse All
Subject Author Date
Marat Garafutdinov May 10, 2004 - 8:27 PM

Hello


What would be an easy way to prevent a CExtControlBar from ever being in a floating state, but still be redockable to any place on the frame window and/or other control bars ?

Technical Support May 11, 2004 - 6:34 AM

Dear Marat,

Just create your own CExtControlBar-derived class and override these two methods:

virtual void ToggleDocking();    
virtual void FloatControlBar( CPoint ptFloat,  
                              DWORD dwStyle = CBRS_ALIGN_TOP ); 
Both methods should do nothing.

Chris Holt May 12, 2004 - 1:27 PM

I just did this and it works except in one intance.  When you go to float a control bar when it is tab-docked it disappears.  It then asserts when you click on the remaining control bar at this line:


ASSERT(nBarIndexInTab >= 0 && nBarIndexInTab < m_wndTabSwitcher.ItemGetCount());


in CExtDynTabControlBar::UpdateBarVisibility.


Any suggestions?

Technical Support May 13, 2004 - 7:01 AM

Dear Chris,

To fix the problem, we need to take a look at the source code.

Chris Holt May 13, 2004 - 7:34 AM

I sent the classes I made in an email to support@fossware.com.