// Set the child window ID of the active view to AFX_IDW_PANE_FIRST.
// This is necessary so that CFrameWnd::RecalcLayout will allocate
// this "first pane" to that portion of the frame window's client
// area not allocated to control bars. Set the child ID of
// the previously active view to some other ID; we will use the
// command ID as the child ID.
CView* pOldActiveView = GetActiveView();
::SetWindowLong(pOldActiveView->m_hWnd, GWL_ID, m_nCurrentView);