Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

Starting from version 2.26, Prof-UIS provides two new methods for setting positions of the resizable control bars: CExtControlBar::DockControlBarInnerOuter() and CExtControlBar::DockControlBarLTRB(). The DockControlBarInnerOuter() method docks a control bar in a new row or column at the most inner or most outer circle. The DockControlBarLTRB() method docks a resizable control bar next to another resizable bar that is already docked. In the latter case, as a result of the method, two control bars share the very same area that was previously occupied by the docked control bar. The sample code below demonstrates how to dock m_wndBar1 in a new column in the left part of the frame. Then m_wndBar2 is docked with m_wndBar1 in the same column and occupies the half-bottom part of m_wndBar1.

m_wndBar1.DockControlBarInnerOuther( AFX_IDW_DOCKBAR_LEFT, false, this );
m_wndBar2.DockControlBarLTRB( &m_wndBar1, AFX_IDW_DOCKBAR_BOTTOM );

You can also use the CExtControlBar::DockControlBar() methods (two overloaded functions) to set the relative positions of the control bars. In the sample below, the first method docks the m_wndResourceViewBar resizable bar to the newly created row in the left part of "docking circle 1". The second one is applied to the already docked m_wndResourceViewBar bar, with its parameters specifying the position of the m_wndServerExplorerBar bar relatively to the m_wndResourceViewBar one.

m_wndResourceViewBar.DockControlBar( AFX_IDW_DOCKBAR_LEFT, 1, this, false );
m_wndResourceViewBar.DockControlBar( &m_wndServerExplorerBar, true, true, this, false );