BCGControlBar Pro for MFC
BOOL CBCGPOutlookBar::RemoveCustomPage ( UINT  uiPage,
CBCGPOutlookWnd pTargetWnd 
)

Removes a custom (user-created) page.

Returns
Nonzero if the custom page has been removed successfully; otherwise 0.

Call this function to delete custom pages. When the page is removed its control ID is returned to the pool of available page IDs. You're required to provide a pointer to CBCGPOutlookWnd in which the page to be removed currently resides. Please, take a note, that detachable pages may be moved by the user between different outlook bars, but the information about a custom page resides in the outlook bar object for which you have called CreateCustomPage(). Use CBCGPBaseTabbedBar::GetUnderlinedWindow to obtain a pointer to outlook window.

Parameters
uiPageZero-based index of the page in the parent outlook window.
pTargetWndPoints to the parent outlook window.