Compartir a través de


CMFCBaseTabCtrl::AddTab

Adds a new tab to the tab control.

virtual void AddTab(
   CWnd* pTabWnd,
   LPCTSTR lpszTabLabel,
   UINT uiImageId = (UINT)-1,,
   BOOL bDetachable = TRUE
);
virtual void AddTab(
   CWnd* pTabWnd,
   UINT uiResTabLabel,
   UINT uiImageId = (UINT)-1,
   BOOL bDetachable = TRUE
);

Parameters

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

  • [in] lpszTabLabel
    A string that contains the label for 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] uiResTabLabel
    The resource ID for the label.

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

Remarks

If pTabWnd points to an object that is not derived from the CDockablePane Class and if bDetachable is TRUE, the framework automatically creates a wrapper for the pTabWnd object. The wrapper makes the pTabWnd object detachable. By default, the wrapper is an instance of the CDockablePaneAdapter Class. If the functionality offered by the default wrapper is unacceptable, use the CMFCBaseTabCtrl::SetDockingBarWrapperRTC method to specify a different wrapper.

Requirements

Header: afxbasetabctrl.h

See Also

Reference

CMFCBaseTabCtrl Class

Hierarchy Chart

CDockablePane Class

CDockablePaneAdapter Class