BCGControlBar Pro for MFC
CBCGPBaseTabWnd* CBCGPBaseControlBar::GetParentTabWnd ( HWND &  hWndTab) const

Retrieves a pointer to the parent tabbed window.

Returns
A valid pointer to the parent tabbed window or NULL.

You can use this function to retrieve a pointer to the parent tabbed window. Sometimes it's not enough to just call GetParent(), because a control bar may be contained inside a docking wrapper (CBCGPDockingCBWrapper). Using this function you'll be able to retrieve a valid pointer (assuming the control bar is inside tabbed window) in any case.

Parameters
hWndTabWhen the function returns and returned value is not NULL, it will contain the handle to the parent tabbed window.