CMFCBaseTabCtrl Class
Implements the base functionality for tabbed windows.
class CMFCBaseTabCtrl : public CWnd
Members
Public Methods
Name |
Description |
---|---|
|
|
Adds a new tab to the tabbed window. |
|
|
|
|
|
|
|
|
|
|
|
Detaches a tab from a tabbed window. |
|
|
|
Enables or disables automatic tab coloring. |
|
Enables or disables custom tooltips for tabs. |
|
Enables or disables direct editing of tab labels. |
|
Enables detachable tabs. |
|
Enables or disables whether the user can change the tab order by using a mouse. |
|
Scrolls the tabs until the specified tab is visible. This method has no effect if the specified tab is already visible. |
|
|
|
Returns a pane that contains a specified point. |
|
|
|
|
|
Returns the index of the active tab. |
|
Returns the background color of the active tab. |
|
Returns the text color of the active tab. |
|
Returns a pointer the active page of the tab control. |
|
Returns a reference to the array of colors that are used for automatic coloring. |
|
Returns a pointer to the first visible tab. |
|
|
|
Returns the index of the currently highlighted tab. |
|
|
|
|
|
|
|
Returns a variable of the LOCATION data type that indicates where the tab area is positioned relative to the tab control. For example, on the top or on the bottom. |
|
|
|
Returns the size and the position of the tab area in the tabbed window. The position of the tab area is defined by using coordinates. |
|
Returns the background color of the specified tab. |
|
Returns the size of the tab borders in the tab control. |
|
Returns the index of the tab that is identified by a specified ID. |
|
|
|
Returns the index of a tab that contains a specified HWND object. |
|
Returns the tab that contains a specified point. |
|
|
|
Returns the icon associated with the specified tab. |
|
Returns the ID of a tab by using the index of the tab. |
|
Returns the icon ID for a specified tab. |
|
Returns the text of a specified tab. |
|
Retrieves the size and position of a specified tab. |
|
|
|
|
|
Returns the text color of a specified tab. |
|
Returns the pointer to a pane that resides on a specified tab page. |
|
Returns the direct pointer to a control that resides on a specified tab page, even if the control has a wrapper. |
|
Returns the number of tabs that are contained in the tab control. |
|
Returns a reference to the tooltip control associated with the CMFCBaseTabCtrl object. |
|
Returns the number of visible tabs. |
|
|
|
Sets an option that hides a window tab, but only if the tabbed window displays a just one visible tab. |
|
Inserts a new tab. |
|
|
|
|
|
Returns a value that indicates whether a tabbed window is in automatic-color mode. |
|
|
|
|
|
|
|
|
|
Returns a value that indicates whether the frame for the tab area is flat or 3D. |
|
|
|
Returns a value that indicates whether the tab control is configured to hide a tab, but only if a tabbed window has just one visible tab. |
|
|
|
Indicates whether users can modify the label on a tab. |
|
|
|
|
|
Indicates whether a tabbed window displays tabs in Microsoft OneNote style. |
|
Checks whether a specified point exists in the tab area. |
|
|
|
|
|
Indicates whether a tab is detachable. |
|
Indicates whether tabs display icons but not labels. |
|
Indicates whether the user can change tab positions by dragging tabs. |
|
Indicates whether a specified tab is visible. |
|
|
|
|
|
Called by the framework when the number of tabs changes. |
|
|
|
|
|
|
|
|
|
|
|
Used by class CWinApp to translate window messages before they are dispatched to the TranslateMessage and DispatchMessage Windows functions. (Overrides CWnd::PreTranslateMessage.) |
|
Recalculates the internal layout of a tabbed window. |
|
Removes all tabs from the tabbed window. |
|
Removes a tab from a tabbed window. |
|
|
|
Resets the image list that is attached to a tabbed window. |
|
Reads or writes this object from or to an archive. (Overrides CObject::Serialize.) |
|
Activates a tab. |
|
Sets the background color for the currently active tab. |
|
Sets the text color for active tabs. |
|
Sets the tab control colors that are applied in automatic color mode. |
|
Sets the wrapper class that is used for any objects that are not derived from the CDockablePane Class. |
|
Enables and disables the processing of prefix characters when tab labels are drawn. |
|
Sets the icon image list. |
|
|
|
Sets the background color for a specified tab. |
|
Sets a new tab border size. |
|
Sets a tab icon. |
|
Sets a tab icon ID. |
|
Enables and disables the "icon only" mode for a specified tab. |
|
Sets a tab label equal to a specified string value. |
|
|
|
Sets the text color for a specified tab. |
|
Arranges tabs in the specified order. |
|
Shows or hides the specified tab. |
|
|
|
|
Protected Methods
Name |
Description |
---|---|
Creates a wrapper for an object derived from CWnd that is not derived from CDockablePane. To dock a CMFCBaseTabCtrl object, every embedded control must either have a docking wrapper or be derived from CDockablePane. You set the class of the wrapper by using SetDockingBayWrapperRTC. |
Data Members
Name |
Description |
---|---|
Specifies whether tabs are selected by using a left mouse click or a right mouse click. |
|
Specifies whether the panes that are contained in the tabs are destroyed automatically. |
Remarks
The CMFCBaseTabCtrl class is an abstract class. Therefore, it cannot be instantiated. To create a tabbed window, you must derive a class from CMFCBaseTabCtrl. The MFC library contains some derived class examples, two of which are CMFCTabCtrl Class and CMFCOutlookBarTabCtrl Class.
Customization Tips
The following tips pertain to the CMFCBaseTabCtrl Class and any classes that inherit from it:
If you enable detachable tabs, do not keep pointers to the tabbed windows. These detachable tabs can be created and destroyed dynamically. Therefore, pointers can become invalid.
You can configure the tab control so that users can move tabs dynamically on a tab control by using the mouse. This functionality is built into the CMFCBaseTabCtrl class. To enable it, call CMFCBaseTabCtrl::EnableTabSwap.
By default, tabs are detachable when you add them to a tab control. You can also add non-detachable tabs by using CMFCBaseTabCtrl::AddTab. If you set the parameter bDetachable to FALSE, the tab will not be detachable. You can also change whether tabs are detachable by calling the method CMFCBaseTabCtrl::EnableTabDetach.
Objects that are derived from the CWnd Class can be put on a dockable control bar or dockable tab. For the whole control to be docked, you must make the CWnd object dockable. To accomplish this, MFC uses a wrapper class. This wrapper class is the CDockablePaneAdapter Class. Any CWnd objects that are added to a dockable control bar or dockable tab will be wrapped inside a CDockablePaneAdapter object. You can disable the automatic wrapping by setting the parameter m_bEnableWrapping of your CMFCBaseTablCtrl object to FALSE. You can also change the class that your application will use as a wrapper by using the method CMFCBaseTabCtrl::SetDockingBarWrapperRTC.
Inheritance Hierarchy
Requirements
Header: afxbasetabctrl.h