It is not possible to use a control bar inside another control bar directly. The control bars are not splitters, but you can use them to create a GUI absolutely similar to the GUI based on nested splitters. You should dock a control bar with the left side of the frame window. This control bar will be a tree view bar and it will occupy the entire column on the left side:
pTreeViewControlBar->DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_LEFT, true );
The table of messages is the main view window in your SDI application. It is not a child of any control bar.
If you need a message preview control bar at the bottom of the table of messages (which is, as we said above, a child view window), then this bar can be docked as follows:
pMessagePreviewControlBar->DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_BOTTOM, true );
The message preview control bar should be docked after the tree view control bar.
Finally, if you need a news tree in the same column with the mail folders tree, then you can create a resizable control bar for this tree and dock it relative to the main folders tree:
pTreeViewControlBar->DockControlBarLTRB(
pNewsTreeControlBar, AFX_IDW_DOCKBAR_BOTTOM );
Of course, we assume that all the control bars were created without CBRS_GRIPPER
style and have no captions. If so, you will get a splitter-like layout similar to that in Outlook Express. You don’t need to create one control bar inside another. The CExtControlBar::DockControlBarLTRB()
methods allow you to dock one bar relative to other already docked control bar and, as result, two control bars will occupy the area previously occupied by one control bar. As we said before, you will be able to hide any of your control bars any time and that is the main advantage which is not provided by splitter windows. If you encounter any difficulties, just send us your project or source code so that we can help you.