Question

I am converting some CToolbars to CMFCToolbars, my CMainFrame inherits from a CMDIFrameWnd class. However I can find no way to dock a CPane / CMFCToolbar to a CMDIFrameWnd, every tutorial or source I have seen uses a CMDIFrameWndEx as the CMainFrame class.

Can anyone confirm that CPane / CMFCToolbars can only be used on CMDIFrameWndEx frames? and if the CPane / CMFCToolbars can be used with CMDIFrameWnd then some code samples?

Was it helpful?

Solution

After searching source code for CBasePane, it appears CMDIFrameWnd CANNOT be used for docking/displaying of CMFCToolBar.

In "afxbasepane.cpp" CBasePane::AdjustDockingLayout(...), CMDIFrameWnd is not listed as an acceptable ParentFrame.

There may be some workaround, but I have no evidence of one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top