I have an MDI application with numerous docking bars etc. I would like to know how to acquire the effective client area of the CView region without any such CView's existing.
Should such a view exist I can simply get its window size but at this stage it doesn't or may NOT.
Using the following from a DLL:
CRect oCRectClient;
AfxGetApp()->GetMainWnd()->GetClientRect(&oCRectClient);
returns the whole CMDIFrameWndEx client area including those regions occupied by the docked panes.
The CMDIFrameWndEx class manages multiple child windows, including menu bar, toolbars, docked toolwindows, and the MDIClient window that provides functionality for hosting MDI Child windows.
https://learn.microsoft.com/en-us/cpp/mfc/managing-mdi-child-windows?view=msvc-170
In VS, right click on the CMDIFrameWndEx class your CMainFrame derives from, and select "Go To Definition" from the context menu. Note the protected m_wndClientArea member. As long as you are in the context of a CMainFrame method, you can readily retrieve the client area of the MDIClient by simply invoking something like: