I have no easy answer for you. I had 3 windows for docking using the MFC feature pack in Visual Studio 2017. I called CleanSlate and then installed the docking panels to make sure they were visible. I experimented with the window size of the main frame and the docking windows so that it looks right.
void CMainFrame::OnButtonWindowResetLayout() { theApp.CleanSlate(); CRect rcInputsOutputs(0, 0, 400, 50); m_wndPaneInputsOutputs.DockToFrameWindow(CBRS_ALIGN_RIGHT, rcInputsOutputs, DT_DOCK_LAST, NULL, -1, FALSE); m_wndPaneInputsOutputs.ShowPane(TRUE); CRect rcDeviceStatus(0, 0, 600, 180); m_wndPaneDeviceStatus.DockToFrameWindow(CBRS_ALIGN_BOTTOM, rcDeviceStatus, DT_DOCK_LAST, NULL, -1, TRUE); m_wndPaneDeviceStatus.ShowPane(TRUE); CRect rcOutput(0, 0, 600, 70); m_wndOutput.DockToFrameWindow(CBRS_ALIGN_BOTTOM, rcOutput, DT_DOCK_LAST, NULL, -1, TRUE); m_wndOutput.ShowPane(TRUE); AdjustDockingLayout(); SetWindowPos(&CWnd::wndTop, 0, 0, 900, 680, SWP_NOMOVE | SWP_NOACTIVATE | SWP_SHOWWINDOW); }
Each panel class has a function:
void CPaneDialogEx::ShowPane(BOOL showPane) { if (showPane != IsVisible()) { CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame, GetTopLevelFrame()); if (pMainFrame != NULL) { pMainFrame->SetFocus(); pMainFrame->ShowPane(this, showPane, FALSE, FALSE); pMainFrame->RecalcLayout(); } } }