The control bar algorithms create tabbed bar container windows dynamically during drag-and-drop or when you load the control bar’s state. The tabbed container is also a resizable control bar. It is a CExtDynTabControlBar
window in case of simple control bars. If you want to use your CExtDynTabControlBar
-classes, you need ti handle the CExtControlBar::g_nMsgCreateTabbedBar
registered windows message in your main frame class:
ON_REGISTERED_MESSAGE( CExtControlBar::g_nMsgCreateTabbedBar, OnMsgCreateTabbedBar )
LRESULT CMainFrame::OnMsgCreateTabbedBar( WPARAM wParam, LPARAM )
{
CExtDynTabControlBar ** ppDynTabBar =
reinterpret_cast < CExtDynTabControlBar ** > ( wParam );
(*ppDynTabBar) = new C_YOUR_CExtDynTabControlBar_DERIVED_CLASS;
}
Of course, your tabbed bar class may implement any kind of custom layout and/or behavior you need.
In case of dynamic resizable control bars the tabbed container is a
CExtDynamicTabbedControlBar
class or derived from it and you should not handle the
CExtControlBar::g_nMsgCreateTabbedBar
registered windows message. Instead, override the
CExtDynamicBarSite::OnDbsCreateTabbedBarInstance()
virtual method:
CExtDynamicTabbedControlBar * CExtDynamicBarSite::OnDbsCreateTabbedBarInstance() const
{
ASSERT( this != NULL );
CExtDynamicTabbedControlBar * pBar =
new C_YOUR_CExtDynamicTabbedControlBar_DERIVED_CLASS;
return pBar;
}