1
votes

In Visual Studio, you can dock arbitrary panes to the main view in the center of the window:enter image description here

In the above image, the Error List pane is being docked to the main view.

I'd like to do that with CDockablePanes in MFC. However, it appears that by default, docking panes to the main view isn't allowed. Is this possible with MFC? If so, how is it done?

1

1 Answers

2
votes

Panes are normally docked to the CMainFrame, and they can be docked above the main view.

If you need to dock them inside your view they should be created (and docked to) in the CChildFrame.

Make sure to use .EnableDocking(CBRS_ALIGN_ANY); and EnableDocking(CBRS_ALIGN_ANY);


In case you are referring to converting a dockable pane to a tabbed document, right click on the pane header and select 'Tabbed Document'.

Also check out CDockablePane::ConvertToTabbedDocument and m_bCanCovertControlBarToMDIChild.