BCGControlBar Pro for MFC
void CBCGPOutlookWnd::AddControl ( CWnd *  pWndCtrl,
LPCTSTR  lpszName,
int  nImageID = -1,
BOOL  bDetachable = TRUE,
DWORD  dwBCGStyle = CBRS_BCGP_FLOAT|CBRS_BCGP_CLOSE|CBRS_BCGP_RESIZE|CBRS_BCGP_AUTOHIDE 
)

Adds a control as a new page of outlook window.

Use this function to add a control as a new page of outlook bar. This function internally calls on CBCGPBaseTabWnd::AddTab.

If you set bDetachable to TRUE, then AddControl internally creates a CBCGPDockingCBWrapper object and wraps the added control. It automatically sets the runtime class of tabbed window to the RTC of CBCGPOutlookBar and RTC of floating frame to CBCGPMultiMiniFrameWnd.

Parameters
pWndCtrlA pointer to a control to add.
lpszNameSpecifies the name of tab.
nImageIDSpecifies the image ID. Should correspond to tab number.
bDetachableIf TRUE, the page will be created as detachable.
nImageIDImage index in the internal image list.
dwBCGStyleSpecifies CBRS_BCGP_* style for wrapped docking bars.