다음을 통해 공유


CMDITabInfo Class

The CMDITabInfo class is used to pass parameters to CMDIFrameWndEx::EnableMDITabbedGroups method. Set members of this class to control the behavior of MDI tabbed groups.

class CMDITabInfo 

Members

Public Constructors

Name

Description

CMDITabInfo::CMDITabInfo

Default constructor.

Public Methods

Name

Description

CMDITabInfo::Serialize

Reads or writes this object from or to an archive.

Data Members

Name

Description

CMDITabInfo::m_bActiveTabCloseButton;

Specifies whether a Close button is displayed on the label of the active tab.

CMDITabInfo::m_bAutoColor

Specifies whether to color the MDI tabs.

CMDITabInfo::m_bDocumentMenu

Specifies whether the tab group displays a popup menu that shows a list of opened documents or displays scroll buttons.

CMDITabInfo::m_bEnableTabSwap

Specifies whether the user can swap the positions of tabs by dragging.

CMDITabInfo::m_bFlatFrame

Specifies whether tabs have a flat frame.

CMDITabInfo::m_bTabCloseButton

Specifies whether each tab label displays a Close button.

CMDITabInfo::m_bTabCustomTooltips

Specifies whether custom tooltips are enabled.

CMDITabInfo::m_bTabIcons

Specifies whether to display icons on MDI tabs.

CMDITabInfo::m_nTabBorderSize

Specifies the border size of each tab window.

CMDITabInfo::m_style

Specifies the style of the tab labels.

CMDITabInfo::m_tabLocation

Specifies whether the tabs labels are located at the top or the bottom of the page.

Remarks

This class specifies the parameters of the MDI tab groups that the framework creates.

Example

The following example demonstrates how to set the values of the various member variables in CMDITabInfo class.

 CMDITabInfo mdiTabParams;
    mdiTabParams.m_style = CMFCTabCtrl::STYLE_3D_ONENOTE; 
    // set to FALSE to place close button at right of tab area
    mdiTabParams.m_bActiveTabCloseButton = FALSE;
    // set to TRUE to enable document icons on MDI taba
    mdiTabParams.m_bTabIcons = TRUE;    
    // set to FALSE to disable auto-coloring of MDI tabs
    mdiTabParams.m_bAutoColor = FALSE; 
    // set to TRUE to enable the document menu at the right edge of the tab area
    mdiTabParams.m_bDocumentMenu = TRUE; 
    //set to TRUE to enable the user to change the tabs positions by dragging the tabs
    mdiTabParams.m_bEnableTabSwap = TRUE;
    // set to TRUE to give each tab window has a flat frame
    mdiTabParams.m_bFlatFrame = TRUE;
    // set to TRUE to enable each tab window to display the Close button on the right edge of the tab. 
    mdiTabParams.m_bTabCloseButton = FALSE;
    // set to TRUE to enable the tabs to display tooltips.
    mdiTabParams.m_bTabCustomTooltips = TRUE;
    // Specifies that the tabs labels are located at the top of the page
    mdiTabParams.m_tabLocation = CMFCTabCtrl::LOCATION_TOP;
    EnableMDITabbedGroups(TRUE, mdiTabParams);

Inheritance Hierarchy

CMDITabInfo

Requirements

Header: afxmdiclientareawnd.h

See Also

Reference

CMDIFrameWndEx Class

Hierarchy Chart

Concepts

MDI Tabbed Groups

Other Resources

MFC Classes