BCGControlBar Pro for MFC
MDI Tabbed Groups

MDI Tabbed Groups interface comes to replace regular MDITabs interface that was implemented by the library prior to version 7.20. It allows to create one or more tabbed windows (or tabbed groups) in place of MDI client area. Tabbed windows can be aligned vertically or horizontally and are divided by splitters.

Key features:

  • Ability to create one or more tabbed windows dynamically or using the library's API.
  • Horizontal or vertical alignment of tabbed windows
  • Tabbed windows are divided by splitters. The splitters allow the user to resize tabbed windows
  • Ability to drag individual tabs between groups.
  • Ability to drag individual tabs and create new groups
  • Ability to move tabs or create new groups using context menu
  • Ability to save and load layout of tabbed windows
  • Option to save and load the list of documents (it also applies to any MDI interface)
  • Ability to drag an MDI child outside the paremt frame and create a new top-level frame ("MDI tear-off")
  • Its' possible to access individual tabbed groups and modify their parameters.

Please see the source code of BCGPVisualStudioGUIDemo and MDITabsDemo samples for additional info.

How to enable the above features:

  1. Use CBCGPMDIFrameWnd::EnableMDITabbedGroups in order to enable the MDI Tabbed Groups feature. The second parameter is an instance of CBCGPMDITabParams class. You can fill it or leave as default prior to passing to CBCGPMDIFrameWnd::EnableMDITabbedGroups.
    Copy
    params.m_nTabBorderSize = 1;
    EnableMDITabbedGroups (TRUE, params);
If you need to change any of the above parameters at runtime, you can just fill a CBCGPMDITabParams object and call CBCGPMDIFrameWnd::EnableMDITabbedGroups again.
  • You can obtain a list of tabbed windows using const CBCGPMDIFrameWnd::GetMDITabGroups method.
  • CBCGPMDIFrameWnd::MDITabNewGroup creates a new tabbed group next to the active group.
  • CBCGPMDIFrameWnd::MDITabMoveToNextGroup moves the active window to the next or previous group.
  • CBCGPMDIFrameWnd::IsMemberOfMDITabGroup tells whether pWnd exists among other tabbed windows.
  • CBCGPMDIFrameWnd::AreMDITabs tells whether the regular MDITabs or MDI Tabbed Groups feature is enabled. Also you can use BOOL CBCGPMDIFrameWnd::IsMDITabbedGroup const to test explicitly for MDI Tabbed Groups feature.
  • Override in the main frame derived class CBCGPMDIFrameWnd::OnShowMDITabContextMenu. It allows to display a popup menu when the user clicks on one of the tabs or drags and drops a tab on another tabbed groups.
  • Call CBCGPMDIFrameWnd::LoadMDIState and CBCGPMDIFrameWnd::SaveMDIState in order to load and save the layout of MDI Tabbed Groups. Also, these methods should be called if you need to load/save the list of opened documents (works for any MDI interface).
  • In order to load/save MDI tabs and groups state and the list of opened documents you need to do the following: