문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top