SECTabControlBase::AddTab

SECTab*SECTabControlBase::AddTab(LPCTSTRlpszLabel, CObject*pClient, HMENUhMenu, void*pExtra)

A new tab is created and appended after the last tab. The label specified by lpszLabel becomes the new tab’s label.
The second parameter is treated as client data which is associated with the tab. Usually, this will be a pointer to a CWnd-derived class which should be shown when its associated tab is active. However, the pClient parameter doesn’t have to be a CWnd-derivative since the SECTabControlBase (and its implementations) only store this data.
The hMenu parameter is an optional menu which should be shown when the tab is active. The pExtra parameter is an optional opaque pointer to user-defined data which the caller needs to associate with the new tab.
As long as you have a tab index, the user can call GetTabInfo to retrieve any of the data members (pClient, hMenu, or pExtra) associated with the new tab.
Upon successful completion, this function returns a pointer to the new tab. You can use this pointer to initialize or change any tab attributes immediately following the call to AddTab.

Defined in: tabctrlb.cpp

Return Value

A pointer to the new tab or NULL if the call failed.

Parameters

lpszLabel

Label to be shown on the tab.

pClient

The object to associate with the tab (Usually CWnd-derived).

hMenu

Optional menu to show when this tab is selected.

pExtra

Opaque pointer to user-defined data to associate with this tab.

See Also

InsertTab

DeleteTab

SECTabControlBase