Condividi tramite


CMFCBaseTabCtrl::InsertTab

Inserts a tab into the tab control.

Virtual void InsertTab(
   CWnd* pNewWnd,
   LPCTSTR lpszTabLabel,
   int nInsertAt,
   UINT uiImageId = (UINT)-1,
   BOOL bDetachable = TRUE
);
virtual void InsertTab(
   CWnd* pNewWnd,
   UINT uiResTabLabel,
   int nInsertAt,
   UINT uiImageId = (UINT)-1,
   BOOL bDetachable = TRUE
);

Parameters

  • [in] pNewWnd
    A pointer to the window that this method adds as a new tab.

  • [in] lpszTabLabel
    A string that contains the label for the new tab.

  • [in] nInsertAt
    The zero-based index of the new tab.

  • [in] uiImageId
    An image ID from the image list. The tab control uses this image as the icon for the new tab.

  • [in] bDetachable
    A Boolean parameter that determines whether the new tab is detachable.

  • [in] uiResTabLabel
    The resource ID for the label.

Remarks

If the object indicated by pNewWnd is not derived from the CDockablePane Class and if the bDetachable parameter is TRUE, the framework creates a special wrapper for the new tab. By default, the wrapper is an instance of the CDockablePaneAdapter Class. Use the CMFCBaseTabCtrl::SetDockingBarWrapperRTC method to create a different wrapper class. Any custom wrapper class needs to be derived from CDockablePaneAdapter.

Requirements

Header: afxbasetabctrl.h

See Also

Reference

CMFCBaseTabCtrl Class

Hierarchy Chart

CDockablePaneAdapter Class

CMFCBaseTabCtrl::SetDockingBarWrapperRTC