SECTab Class

class SECTab: public CObject

The SECTab class defines the attributes of one tab within a tab control.

Defined in: tabctrlb.h

Comments

All information that varies on a per tab basis (i.e., tab label, width, etc.) is stored here. There are two occasions when you might need to make use of this class. First, if you would like to get direct access to the tab attributes, you can call SECTabControl::SECTabControl::GetTab which returns a reference to an object of this class. Once you have a reference to an SECTab object, you can retrieve or set values and have the modifications be reflected with the next redraw.

Knowledge of this class is also required when you need to derive from it. For example, you may want to derive your own tab classes from SECTab and add your domain-specific attributes there. So, when a new tab is activated, you have easy access to your own data members that are associated with the active tab. To do this, you’ll need to override the SECTabControl::SECTabControl::CreateNewTab member and create an instance of your own class (which must be derived from SECTab).

See the TABDEMO sample in the \SAMPLES\TOOLKIT\STANDARD\TABS\TABDEMO directory for a demonstration of this class.

See Also

SECTabControl

Class Members

CString  m_csLabel

The string which is rendered as the tab’s label.

int  m_nWidth

The width of this tab.

int  m_nHeight

The height of this tab.

BOOL  m_bSelected

True if tab is selected.

CObject*  m_pClient

The client associated with this tab.

HMENU  m_hMenu

The menu associated with this tab.

void*  m_pExtra

Any user-defined tab associated with this tab.