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 » How to prevent CExtControlBar from floating outside the client area? Collapse All
Subject Author Date
Dejan Kienzle Sep 18, 2010 - 6:02 AM

Dear support team,


I am working on a MDI application where every MDI child window has it’s own set of CExtControlBar Wnds. Now I am looking for a way to


1. show/hide the CExtControlBars when the MDI Child is max/min


2. prevent the CExtControlBars from leaving the client area (child wnd)


Any help is highly appreciated.


Thanks in advance,


Dejan

Technical Support Sep 20, 2010 - 10:20 AM

Simple control bars (CExtControlBar) do not support this feature but dynamic control bars (CExtDynamicControlBar and CExtDynamicBarSite) support it. Please check out the SDI_DynamicBars and MDI_DynamicBars sample applications.

Technical Support Sep 20, 2010 - 3:19 AM

First of all, you should use a CExtControlBar-derived class and override the following virtual method in it without invoking the parent class method:

virtual void FloatControlBar(
            CPoint ptFloat,
            DWORD dwStyle = CBRS_ALIGN_TOP
            )
{
            ASSERT_VALID( this );
            ptFloat;
            dwStyle;
}

This will disable switching to the floating state.
Second, the tabbed bar groups are dynamic instances of resizable bars. You should make Prof-UIS using your tabbed bar class which implements the same virtual button. Here is the short article describing how create your tabbed bar and make Prof-UIS using it:

http://www.prof-uis.com/prof-uis/tech-support/faq/control-bars.aspx#how-to-remove-the-close-button-x-from-the-control-bar

Third, there are two control bar drag-n-dropping algorithms provided by Prof-UIS:

1) Visual Studio .NET like. It’s based on prediction bands. It does not switch resizable bars into the floating state until you drop the bar.

2) Visual Studio 2005/2008/2010 like. It’s based on docking markers (guide diamonds). It switches the bar into the floating state when you start bar drag-n-dropping.

Different UI themes in Prof-UIS use these control bar drag-n-dropping algorithms. The 2nd algorithm is not friendly to the resizable control bars which prevent floating state. So, the fourth and the last task is to make Prof-UIS always using the 1st algorithm. Please invoke the following line of code during your application initialization before creating the resizable bars:
CExtControlBar::g_eResizablePanelDockingType = CExtControlBar::__RESIZABLE_DOCKING_TYPE_STUDIO_2003;

Dejan Kienzle Sep 20, 2010 - 4:58 AM

Thanks for responding! Seems like I didnt descibe my issues very well, sorry . I dont want to prevent them from  floating. I am looking for a way (if possible at all) to make them a child of the MDI child wnd and therefore not to leave the client area of the MDI child. Similar to the behavior of a MDI child and its parent frame.


thanks,


Dejan