CMDIFrameWndEx::EnableMDITabbedGroups

Enables or disables the MDI tabbed groups feature for the frame window.

void EnableMDITabbedGroups(
   BOOL bEnable,
   const CMDITabInfo& params 
);

Parameters

  • [in] bEnable
    If TRUE, the MDI tabbed groups feature is enabled; if FALSE, the MDI tabbed groups feature is disabled.

  • [in] params
    Specifies parameters that the framework applies to child windows that are created in the MDI client area.

Remarks

Use this method to enable or disable the MDI tabbed groups feature. This feature enables MDI applications to display child windows as tabbed windows that are aligned vertically or horizontally within the MDI client area. Groups of tabbed windows are separated by splitters. The user can resize tabbed groups by using a splitter.

  • The user can:

  • Drag individual tabs between groups.

  • Drag individual tabs to the edge of the window to create new groups.

  • Move tabs or create new groups by using a shortcut menu.

  • Your application can save the current layout of tabbed windows and the list of currently opened documents.

If you call this method with bEnable set to FALSE, params is ignored.

Even if MDI tabbed groups is already enabled, you can call this method again to modify the settings for child windows. Call the method with bEnable set to TRUE and modify the members of the CMDITabInfo object that are specified by the params parameter.

For more information about how to use MDI tabbed groups, see MDI Tabbed Groups.

Example

The following example shows how EnableMDITabbedGroups is used in the VisualStudioDemo Sample: MFC Visual Studio Application.

    CMDITabInfo mdiTabParams;
    mdiTabParams.m_bTabCustomTooltips = TRUE;

    if (bMDITabsVS2005Look)
    {
        mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_VS2005;
        mdiTabParams.m_bDocumentMenu = TRUE;
    }
    else if (bOneNoteTabs)
    {
        mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_ONENOTE;
        mdiTabParams.m_bAutoColor = bMDITabColors;
    }

    if (bActiveTabCloseButton)
    {
        mdiTabParams.m_bTabCloseButton = FALSE;
        mdiTabParams.m_bActiveTabCloseButton = TRUE;
    }

    EnableMDITabbedGroups(TRUE, mdiTabParams);

Requirements

Header: afxMDIFrameWndEx.h

See Also

Concepts

MDI Tabbed Groups

MFC Hierarchy Chart

Reference

CMDIFrameWndEx Class

CMDITabInfo Class