The CMDITabInfo class is used to pass parameters to CMDIFrameWndEx::EnableMDITabbedGroups method. 设置此类的成员以控制 MDI 选项卡式组的行为。
Syntax
class CMDITabInfo
Members
Public Constructors
| Name | Description | 
|---|---|
| CMDITabInfo::CMDITabInfo | Default constructor. | 
Public Methods
| Name | Description | 
|---|---|
| CMDITabInfo::Serialize | 从存档读取该对象或将该对象写入存档。 | 
Data Members
| Name | Description | 
|---|---|
| CMDITabInfo::m_bActiveTabCloseButton; | Specifies whether a Close button is displayed on the label of the active tab. | 
| CMDITabInfo::m_bAutoColor | 指定是否为 MDI 选项卡着色。 | 
| CMDITabInfo::m_bDocumentMenu | 指定选项卡组是显示列出打开文档列表的弹出菜单还是显示滚动按钮。 | 
| CMDITabInfo::m_bEnableTabSwap | 指定用户是否可以通过拖动来交换选项卡的位置。 | 
| CMDITabInfo::m_bFlatFrame | 指定选项卡是否具有平面框架。 | 
| CMDITabInfo::m_bTabCloseButton | Specifies whether each tab label displays a Close button. | 
| CMDITabInfo::m_bTabCustomTooltips | 指定是否启用自定义工具提示。 | 
| CMDITabInfo::m_bTabIcons | 指定是否在 MDI 选项卡上显示图标。 | 
| CMDITabInfo::m_nTabBorderSize | 指定每个选项卡窗口的边框大小。 | 
| CMDITabInfo::m_style | 指定选项卡标签的样式。 | 
| CMDITabInfo::m_tabLocation | 指定选项卡标签是位于页面顶部还是底部。 | 
Remarks
此类指定框架创建的 MDI 选项卡组的参数。
Example
以下示例演示如何设置 CMDITabInfo 类中各成员变量的值。
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
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
指定每个 MDI 选项卡是否都有自己的颜色。
BOOL m_bAutoColor;
Remarks
如果为 TRUE,则每个选项卡都有自己的颜色。 颜色集由 MFC 库管理。 否则,选项卡将显示为白色。 默认值是 FALSE。
CMDITabInfo::m_bDocumentMenu
指定每个选项卡是否显示一个弹出菜单,该菜单在选项卡区域的右边缘显示打开的文档列表。
BOOL m_bDocumentMenu;
Remarks
如果为 TRUE,则每个选项卡窗口都会显示一个弹出菜单,该菜单在选项卡区域的右边缘显示打开的文档列表;否则,选项卡窗口会在选项卡区域的右边缘显示滚动按钮。 默认值是 FALSE。
CMDITabInfo::m_bEnableTabSwap
指定用户是否可以通过拖动来交换选项卡的位置。
BOOL m_bEnableTabSwap;
Remarks
如果为 TRUE,则用户可以通过拖动选项卡来更改选项卡位置。 否则,用户无法更改选项卡位置。 默认值为 TRUE。
CMDITabInfo::m_bFlatFrame
指定每个选项卡窗口是否具有平面框架。
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. 默认值为 TRUE。
CMDITabInfo::m_bTabCustomTooltips
指定选项卡是否显示工具提示。
BOOL m_bTabCustomTooltips;
Remarks
如果为 TRUE,则应用程序向主框架发送 AFX_WM_ON_GET_TAB_TOOLTIP 消息。 可以使用 ON_REGISTERED_MESSAGE 宏处理此消息。
CMDITabInfo::m_bTabIcons
指定是否在 MDI 选项卡上显示图标。
BOOL m_bTabIcons;
Remarks
如果为 TRUE,则每个 MDI 选项卡上都会显示图标。否则,不会在选项卡上显示图标。 默认值是 FALSE。
CMDITabInfo::m_nTabBorderSize
指定每个选项卡窗口的边框大小(以像素为单位)。
int m_nTabBorderSize;
Remarks
CMFCVisualManager::GetMDITabsBordersSize returns the default value.
CMDITabInfo::m_style
指定选项卡标签的样式。
CMFCTabCtrl::Style m_style
Remarks
为选项卡标签指定以下样式之一:
| Macro | Description | 
|---|---|
| STYLE_3D | 3D style. | 
| STYLE_3D_ONENOTE | Microsoft OneNote 样式。 | 
| STYLE_3D_VS2005 | Microsoft Visual Studio 2005 样式。 | 
| STYLE_3D_SCROLLED | 带有矩形选项卡标签的 3D 样式。 | 
| STYLE_FLAT_SHARED_HORZ_SCROLL | 带有共享水平滚动条的平面样式。 | 
| STYLE_3D_ROUNDED_SCROLL | 带有圆形选项卡标签的 3D 样式。 | 
CMDITabInfo::m_tabLocation
指定选项卡标签是位于页面顶部还是底部。
CMFCTabCtrl::Location m_tabLocation;
Remarks
将以下位置标志之一应用于选项卡:
- LOCATION_BOTTOM:选项卡标签位于页面底部。 
- LOCATION_TOP:选项卡标签位于页面顶部 
CMDITabInfo::Serialize
从存档中读取此对象或将其写入存档。
void Serialize(CArchive& ar);
Parameters
              ar
[in] A CArchive Class object to serialize.