BCGControlBar Pro for MFC
virtual BOOL CBCGPDockingControlBar::DockToWindow ( CBCGPDockingControlBar pTargetWindow,
DWORD  dwAlignment,
LPCRECT  lpRect = NULL 
)
virtual

Docks the docking control bar to another docking control bar.

Returns
Nonzero if the control bar was docked successfully; otherwise 0.

Call this member function to dock one control bar to another control bar with dwAlignment.

You should use this method instead of CBCGPFrameWnd::DockControlBarLeftOf that is actual for toolbars only (for control bars that are docked at dock bar).

Parameters
pTargetWindowA pointer to a target docking control bar.
dwAlignmentSpecifies the docking alignment
lpRectSpecifies the docking rectangle.

Example:

Copy
// docks the watch bar at the left side of the output view, creating a container that
// contains the output view and the watch bar divided by the vertical splitter
// Note, that the output view is docked to the main frame first
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
.....
DockControlBar(&m_wndOutputView);
m_wndWatchBar.DockToWindow (&m_wndOutputView, CBRS_ALIGN_LEFT);
.....
}