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.