SECTabWndBase::InsertTab
A new tab is created and inserted immediately before the tab with the index nIndex and the tabbed window is redrawn.
There are two versions of this member function: the first adds an existing window to the tabbed window, and the second dynamically creates the window before adding it.
Create a new instance of the object with the runtime class specified by pViewClass. Also, a new tab is added and associated with the child window just created.
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 InsertTab.
Defined in: tabwndb.cpp
Syntax
InsertTab(CWnd* pWnd, int nIndex, LPCTSTR lpszLabel)
InsertTab(CRuntimeClass* pViewClass, int nIndex, LPCTSTR lpszLabel, CCreateContext* pContext, UINT nID)
Return Value
A pointer to the new SECTab object; NULL if a failure occurred.
Parameters
pWnd
A pointer to the client window to be associated with the new tab.
nIndex
Index of tab to insert before.
lpszLabel
Label to be shown on the new tab.
pViewClass
Specifies the CRuntimeClass of the new view.
pContext
A pointer to a creation context used to create the view (usually the pContext passed into the parent frame’s overridden CFrameWnd::OnCreateClient member function in which the tabbed window is being created).
nID
Window ID to assign to the new view.
See Also