CTabCtrl Class

Provides the functionality of the Windows common tab control.

class CTabCtrl : public CWnd

Members

Public Constructors

Name

Description

CTabCtrl::CTabCtrl

Constructs a CTabCtrl object.

Public Methods

Name

Description

CTabCtrl::AdjustRect

Calculates a tab control's display area given a window rectangle, or calculates the window rectangle that would correspond to a given display area.

CTabCtrl::Create

Creates a tab control and attaches it to an instance of a CTabCtrl object.

CTabCtrl::CreateEx

Creates a tab control with the specified Windows extended styles and attaches it to an instance of a CTabCtrl object.

CTabCtrl::DeleteAllItems

Removes all items from a tab control.

CTabCtrl::DeleteItem

Removes an item from a tab control.

CTabCtrl::DeselectAll

Resets items in a tab control, clearing any that were pressed.

CTabCtrl::DrawItem

Draws a specified item of a tab control.

CTabCtrl::GetCurFocus

Retrieves the tab with the current focus of a tab control.

CTabCtrl::GetCurSel

Determines the currently selected tab in a tab control.

CTabCtrl::GetExtendedStyle

Retrieves the extended styles that are currently in use for the tab control.

CTabCtrl::GetImageList

Retrieves the image list associated with a tab control.

CTabCtrl::GetItem

Retrieves information about a tab in a tab control.

CTabCtrl::GetItemCount

Retrieves the number of tabs in the tab control.

CTabCtrl::GetItemRect

Retrieves the bounding rectangle for a tab in a tab control.

CTabCtrl::GetItemState

Retrieves the state of the indicated tab control item.

CTabCtrl::GetRowCount

Retrieves the current number of rows of tabs in a tab control.

CTabCtrl::GetToolTips

Retrieves the handle of the tool tip control associated with a tab control.

CTabCtrl::HighlightItem

Sets the highlight state of a tab item.

CTabCtrl::HitTest

Determines which tab, if any, is at a specified screen position.

CTabCtrl::InsertItem

Inserts a new tab in a tab control.

CTabCtrl::RemoveImage

Removes an image from a tab control's image list.

CTabCtrl::SetCurFocus

Sets the focus to a specified tab in a tab control.

CTabCtrl::SetCurSel

Selects a tab in a tab control.

CTabCtrl::SetExtendedStyle

Sets the extended styles for a tab control.

CTabCtrl::SetImageList

Assigns an image list to a tab control.

CTabCtrl::SetItem

Sets some or all of a tab's attributes.

CTabCtrl::SetItemExtra

Sets the number of bytes per tab reserved for application-defined data in a tab control.

CTabCtrl::SetItemSize

Sets the width and height of an item.

CTabCtrl::SetItemState

Sets the state of the indicated tab control item.

CTabCtrl::SetMinTabWidth

Sets the minimum width of items in a tab control.

CTabCtrl::SetPadding

Sets the amount of space (padding) around each tab's icon and label in a tab control.

CTabCtrl::SetToolTips

Assigns a tool tip control to a tab control.

Remarks

A "tab control" is analogous to the dividers in a notebook or the labels in a file cabinet. By using a tab control, an application can define multiple pages for the same area of a window or dialog box. Each page consists of a set of information or a group of controls that the application displays when the user selects the corresponding tab. A special type of tab control displays tabs that look like buttons. Clicking a button should immediately perform a command instead of displaying a page.

This control (and therefore the CTabCtrl class) is available only to programs running under Windows 95/98 and Windows NT version 3.51 and later.

For more information on using CTabCtrl, see Controls and Using CTabCtrl.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CTabCtrl

Requirements

Header: afxcmn.h

See Also

Reference

CWnd Class

Hierarchy Chart

CHeaderCtrl Class

CListCtrl Class