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 Tech Support » CExtControlBar question Collapse All
Subject Author Date
tera tera Apr 21, 2009 - 7:45 PM

Hello.


I want to prohibit the float of this bar.

And can you prohibit docking?


Technical Support Apr 22, 2009 - 11:30 AM

Please use a custom CExtControlBar-derived class which implements the CExtControlBar::FloatControlBar() and CExtControlBar::ToggleDocking() virtual methods. Both methods should have empty bodies and should not invoke the parent class methods. But if your control bar is inside a tabbed bar group, you will be able to float entire tabbed bar group. The tabbed bar group is also a kind of resizable control bar. It’s the CExtDynTabControlBar window in case of simple resizable control bars. It’s the CExtDynamicTabbedControlBar in case of dynamic resizable control bars. So, you may need to create a similar class derived from one of these classes with the same virtual methods. In case of simple resizable control bars, to make Prof-UIS using your tabbed bar class you should handle the CExtControlBar::g_nMsgCreateTabbedBar registered message:

class C_YOUR_DynTabControlBar : public CExtDynTabControlBar
{
    . . .
};
 
ON_REGISTERED_MESSAGE( CExtControlBar::g_nMsgCreateTabbedBar, OnMsgCreateTabbedBar )
 
LRESULT CMainFrame::OnMsgCreateTabbedBar( WPARAM wParam, LPARAM lParam )
{
    lParam;
CExtDynTabControlBar ** ppBar = (CExtDynTabControlBar **)wParam;
    (*ppBar) = new C_YOUR_DynTabControlBar;
    return 0L;
}

In case of dynamic resizable control bars you should implement the CExtDynamicBarSite::OnDbsCreateTabbedBarInstance() virtual method and instantiate your CExtDynamicTabbedControlBar-derived object in it.
You can all the bars be docked into the same tabbed group with your non-floating bar. You should override the CExtControlBar::_CanDockToTabbedContainers() virtual method for that and simply return false from it.