Share via


CMDITabInfo Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at 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.

Syntax

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

CMDITabInfo::m_bActiveTabCloseButton;

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

BOOL m_bActiveTabCloseButton;  

Remarks

If TRUE, the label of the active tab will display a Close button. The Close button will be removed from the right top corner of the tab area. Otherwise, the label of the active tab will not display a Close button. The Close button will appear in the right top corner of the tab area.

CMDITabInfo::m_bAutoColor

Specifies whether each MDI tab has its own color.

BOOL m_bAutoColor;  

Remarks

If TRUE, each tab will have its own color. The set of colors is managed by the MFC library. Otherwise, the tabs are displayed in white. The default value is FALSE.

CMDITabInfo::m_bDocumentMenu

Specifies whether each tab displays a popup menu that shows a list of opened documents at the right edge of the tab area.

BOOL m_bDocumentMenu;  

Remarks

If TRUE, each tab windows displays a popup menu that shows a list of opened documents at the right edge of the tab area; Otherwise, the tab window displays scroll buttons at the right edge of the tab area. The default value is FALSE.

CMDITabInfo::m_bEnableTabSwap

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

BOOL m_bEnableTabSwap;  

Remarks

If TRUE, the user can change the tabs positions by dragging the tabs. Otherwise, the user cannot change the tabs positions. The default value is TRUE.

CMDITabInfo::m_bFlatFrame

Specifies whether each tab window has a flat frame.

BOOL m_bFlatFrame;  

CMDITabInfo::m_bTabCloseButton

Specifies whether each tab window displays a Close button.

BOOL m_bTabCloseButton;  

Remarks

If TRUE, each tab window displays the Close button on the right edge of the tab. Otherwise, the Close button is not displayed. The default value is TRUE.

CMDITabInfo::m_bTabCustomTooltips

Specifies whether the tabs display tooltips.

BOOL m_bTabCustomTooltips;  

Remarks

If TRUE, the application sends an AFX_WM_ON_GET_TAB_TOOLTIP message to the main frame. You can handle this message by using the ON_REGISTERED_MESSAGE macro.

CMDITabInfo::m_bTabIcons

Specifies whether to display icons on MDI tabs.

BOOL m_bTabIcons;  

Remarks

If TRUE, icons are displayed on each MDI tab. Otherwise, icons are not displayed on tabs. The default value is FALSE.

CMDITabInfo::m_nTabBorderSize

Specifies the border size, in pixels, of each tab window.

int m_nTabBorderSize;  

Remarks

CMFCVisualManager::GetMDITabsBordersSize returns the default value.

CMDITabInfo::m_style

Specifies the style of the tab labels.

CMFCTabCtrl::Style m_style  

Remarks

Specify one of the following styles for the tab labels:

STYLE_3D
3D style.

STYLE_3D_ONENOTE
Microsoft OneNote style.

STYLE_3D_VS2005
Microsoft Visual Studio 2005 style.

STYLE_3D_SCROLLED
3D style with rectangle tab labels.

STYLE_FLAT_SHARED_HORZ_SCROLL
Flat style with shared horizontal scroll bar.

STYLE_3D_ROUNDED_SCROLL
3D style with round tab labels.

CMDITabInfo::m_tabLocation

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

CMFCTabCtrl::Location m_tabLocation;  

Remarks

Apply to the tabs one of the following location flags:

  • LOCATION_BOTTOM: the tabs labels are located at the bottom of the page.

  • LOCATION_TOP: the tabs labels are located at the top of the page

CMDITabInfo::Serialize

Reads or writes this object from an archive or to an archive.

void Serialize(CArchive& ar);

Parameters

[in] ar
A CArchive Class object to serialize.

See Also

CMDIFrameWndEx Class
MDI Tabbed Groups
Hierarchy Chart
Classes