CMFCToolbar and CMDIFrameWnd

617 views Asked by At

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?

1

There are 1 answers

0
diox8tony On BEST ANSWER

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.