Udostępnij za pośrednictwem


CMFCBaseTabCtrl Class

The CMFCBaseTabCtrl class implements the base functionality for tabbed windows.

class CMFCBaseTabCtrl : public CWnd

Members

Public Methods

Name

Description

CMFCBaseTabCtrl::AddIcon

 

CMFCBaseTabCtrl::AddTab

Adds a new tab to the tabbed window.

CMFCBaseTabCtrl::ApplyRestoredTabInfo

 

CMFCBaseTabCtrl::AutoDestroyWindow

 

CMFCBaseTabCtrl::CalcRectEdit

 

CMFCBaseTabCtrl::CleanUp

 

CMFCBaseTabCtrl::ClearImageList

 

CMFCBaseTabCtrl::DetachTab

Detaches a tab from a tabbed window.

CMFCBaseTabCtrl::EnableActivateLastActive

 

CMFCBaseTabCtrl::EnableAutoColor

Enables or disables automatic tab coloring.

CMFCBaseTabCtrl::EnableCustomToolTips

Enables or disables custom tooltips for tabs.

CMFCBaseTabCtrl::EnableInPlaceEdit

Enables or disables direct editing of tab labels.

CMFCBaseTabCtrl::EnableTabDetach

Enables detachable tabs.

CMFCBaseTabCtrl::EnableTabSwap

Enables or disables the user's ability to change the tab order using a mouse.

CMFCBaseTabCtrl::EnsureVisible

Scrolls the tabs until the specified tab is visible. This method has no effect if the specified tab is already visible.

CMFCBaseTabCtrl::EnterDragMode

 

CMFCBaseTabCtrl::FindTargetWnd

Returns a pane that contains a specified point.

CMFCBaseTabCtrl::FireChangeActiveTab

 

CMFCBaseTabCtrl::FireChangingActiveTab

 

CMFCBaseTabCtrl::GetActiveTab

Returns the index of the active tab.

CMFCBaseTabCtrl::GetActiveTabColor

Returns the background color of the active tab.

CMFCBaseTabCtrl::GetActiveTabTextColor

Returns the text color of the active tab.

CMFCBaseTabCtrl::GetActiveWnd

Returns a pointer the active page of the tab control.

CMFCBaseTabCtrl::GetAutoColors

Returns a reference to the array of colors that are used for automatic coloring.

CMFCBaseTabCtrl::GetFirstVisibleTab

Returns a pointer to the first visible tab.

CMFCBaseTabCtrl::GetFirstVisibleTabNum

 

CMFCBaseTabCtrl::GetHighlightedTab

Returns the index of the currently highlighted tab.

CMFCBaseTabCtrl::GetImageList

 

CMFCBaseTabCtrl::GetImageSize

 

CMFCBaseTabCtrl::GetLastVisibleTab

 

CMFCBaseTabCtrl::GetLocation

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.

CMFCBaseTabCtrl::GetMaxWindowSize

 

CMFCBaseTabCtrl::GetTabArea

Returns the size and the position of the tab area in the tabbed window. The position of the tab area is defined using coordinates.

CMFCBaseTabCtrl::GetTabBkColor

Returns the background color of the specified tab.

CMFCBaseTabCtrl::GetTabBorderSize

Returns the size of the tab borders in the tab control.

CMFCBaseTabCtrl::GetTabByID

Returns the index of the tab that is identified by a specified ID.

CMFCBaseTabCtrl::GetTabCloseButton

 

CMFCBaseTabCtrl::GetTabFromHwnd

Returns the index of a tab that contains a specified HWND object.

CMFCBaseTabCtrl::GetTabFromPoint

Returns the tab that contains a specified point.

CMFCBaseTabCtrl::GetTabFullWidth

 

CMFCBaseTabCtrl::GetTabHicon

Returns the icon associated with the specified tab.

CMFCBaseTabCtrl::GetTabID

Returns the ID of a tab by using the tab's index.

CMFCBaseTabCtrl::GetTabIcon

Returns the icon ID for a specified tab.

CMFCBaseTabCtrl::GetTabLabel

Returns the text of a specified tab.

CMFCBaseTabCtrl::GetTabRect

Retrieves the size and position of a specified tab.

CMFCBaseTabCtrl::GetTabsHeight

 

CMFCBaseTabCtrl::GetTabsRect

 

CMFCBaseTabCtrl::GetTabTextColor

Returns the text color of a specified tab.

CMFCBaseTabCtrl::GetTabWnd

Returns the pointer to a pane that resides on a specified tab page.

CMFCBaseTabCtrl::GetTabWndNoWrapper

Returns the direct pointer to a control that resides on a specified tab page, even if the control has a wrapper.

CMFCBaseTabCtrl::GetTabsNum

Returns the number of tabs that are contained within the tab control.

CMFCBaseTabCtrl::GetToolTipCtrl

Returns a reference to the tooltip control associated with the CMFCBaseTabCtrl object.

CMFCBaseTabCtrl::GetVisibleTabsNum

Returns the number of visible tabs.

CMFCBaseTabCtrl::HasImage

 

CMFCBaseTabCtrl::HideSingleTab

Sets an option that hides a window tab, but only if the tabbed window displays a single, visible tab.

CMFCBaseTabCtrl::InsertTab

Inserts a new tab.

CMFCBaseTabCtrl::InvalidateTab

 

CMFCBaseTabCtrl::IsActiveTabCloseButton

 

CMFCBaseTabCtrl::IsAutoColor

Returns a value that indicates whether a tabbed window is in automatic-color mode.

CMFCBaseTabCtrl::IsAutoDestroyWindow

 

CMFCBaseTabCtrl::IsColored

 

CMFCBaseTabCtrl::IsDialogControl

 

CMFCBaseTabCtrl::IsDrawNoPrefix

 

CMFCBaseTabCtrl::IsFlatFrame

Returns a value that indicates whether the frame for the tab area is flat or 3D.

CMFCBaseTabCtrl::IsFlatTab

 

CMFCBaseTabCtrl::IsHideSingleTab

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.

CMFCBaseTabCtrl::IsIconAdded

 

CMFCBaseTabCtrl::IsInPlaceEdit

Indicates whether users can modify the label on a tab.

CMFCBaseTabCtrl::IsLeftRightRounded

 

CMFCBaseTabCtrl::IsMDITab

 

CMFCBaseTabCtrl::IsOneNoteStyle

Indicates whether a tabbed window displays tabs in Microsoft OneNote style.

CMFCBaseTabCtrl::IsPtInTabArea

Checks if a specified point exists inside the tab area.

CMFCBaseTabCtrl::IsTabCloseButtonHighlighted

 

CMFCBaseTabCtrl::IsTabCloseButtonPressed

 

CMFCBaseTabCtrl::IsTabDetachable

Indicates whether a tab is detachable.

CMFCBaseTabCtrl::IsTabIconOnly

Indicates whether tabs display icons but not labels.

CMFCBaseTabCtrl::IsTabSwapEnabled

Indicates whether the user can change tab positions by dragging tabs.

CMFCBaseTabCtrl::IsTabVisible

Indicates whether a specified tab is visible.

CMFCBaseTabCtrl::IsVS2005Style

 

CMFCBaseTabCtrl::MoveTab

 

CMFCBaseTabCtrl::OnChangeTabs

Called by the framework when the number of tabs changes.

CMFCBaseTabCtrl::OnDragEnter

 

CMFCBaseTabCtrl::OnDragLeave

 

CMFCBaseTabCtrl::OnDragOver

 

CMFCBaseTabCtrl::OnDrop

 

CMFCBaseTabCtrl::OnRenameTab

 

CMFCBaseTabCtrl::PreTranslateMessage

Used by class CWinApp to translate window messages before they are dispatched to the TranslateMessage and DispatchMessage Windows functions. (Overrides CWnd::PreTranslateMessage.)

CMFCBaseTabCtrl::RecalcLayout

Recalculates the internal layout of a tabbed window.

CMFCBaseTabCtrl::RemoveAllTabs

Removes all tabs from the tabbed window.

CMFCBaseTabCtrl::RemoveTab

Removes a tab from a tabbed window.

CMFCBaseTabCtrl::RenameTab

 

CMFCBaseTabCtrl::ResetImageList

Resets the image list attached to a tabbed window.

CMFCBaseTabCtrl::Serialize

Reads or writes this object from or to an archive. (Overrides CObject::Serialize.)

CMFCBaseTabCtrl::SetActiveTab

Activates a tab.

CMFCBaseTabCtrl::SetActiveTabColor

Sets the background color for the currently active tab.

CMFCBaseTabCtrl::SetActiveTabTextColor

Sets the text color for active tabs.

CMFCBaseTabCtrl::SetAutoColors

Sets the tab control colors that are applied in automatic color mode.

CMFCBaseTabCtrl::SetDockingBarWrapperRTC

Sets the wrapper class that is used for any objects that are not derived from the CDockablePane Class.

CMFCBaseTabCtrl::SetDrawNoPrefix

Enables and disables the processing of prefix characters when drawing tab labels.

CMFCBaseTabCtrl::SetImageList

Sets the icon image list.

CMFCBaseTabCtrl::SetLocation

 

CMFCBaseTabCtrl::SetTabBkColor

Sets the background color for a specified tab.

CMFCBaseTabCtrl::SetTabBorderSize

Sets a new tab border size.

CMFCBaseTabCtrl::SetTabHicon

Sets a tab icon.

CMFCBaseTabCtrl::SetTabIcon

Sets a tab icon ID.

CMFCBaseTabCtrl::SetTabIconOnly

Enables and disables the "icon only" mode for a specified tab.

CMFCBaseTabCtrl::SetTabLabel

Sets a tab's label equal to a specified string value.

CMFCBaseTabCtrl::SetTabsHeight

 

CMFCBaseTabCtrl::SetTabTextColor

Sets the text color for a specified tab.

CMFCBaseTabCtrl::SetTabsOrder

Arranges tabs in the specified order.

CMFCBaseTabCtrl::ShowTab

Shows or hides the specified tab.

CMFCBaseTabCtrl::StartRenameTab

 

CMFCBaseTabCtrl::SwapTabs

 

Protected Methods

Name

Description

CMFCBaseTabCtrl::CreateWrapper

Creates a wrapper for an object derived from CWnd that is not derived from CDockablePane. In order 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

CMFCBaseTabCtrl::m_bActivateTabOnRightClick

Specifies whether tabs are selected by using either a left or a right mouse click.

CMFCBaseTabCtrl::m_bAutoDestroyWindow

Specifies whether the panes that are contained within the tabs are destroyed automatically.

Remarks

The CMFCBaseTabCtrl class is an abstract class. This means that it cannot be instantiated. In order to create a tabbed window, you must derive a class from CMFCBaseTabCtrl. The MFC library contains some derived class examples for your use. Two examples are CMFCTabCtrl Class and CMFCOutlookBarTabCtrl Class.

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CMFCBaseTabCtrl

Requirements

Header: afxbasetabctrl.h

See Also

Concepts

MFC Hierarchy Chart

Reference

CMFCTabCtrl Class

CMFCOutlookBarTabCtrl Class

Other Resources

Classes (MFC Feature Pack)