Issue: The MFC program uses the Ribbon style, so no other menus are displayed. There is a system automatically generated docking pane, by the pane accidentally turned off, and then debugging also show No. Do you have a swollen handle?
Solution: Eliminate docking position, storage memory function: In CMainFrame, before Createdocablepane, call Cmainframe::enableloaddockstate (FALSE);
If the MFC program is not ribbon-style, the form interface is generally as follows:
The hidden panes can be displayed again by adding the following code in the View menu:
CDockablePane::ShowPane ();
Docablepane dockable windows in the process of using the problem summary VC MFC
Issue one: The dockable window shows no docking to the specified location in the upper-left corner
These days in Tune Docablepane dockable window VC + + 2010, encountered this title problem.
Current exposure to the cause:
1, DockPane (&m_yourpane);//not invoked, or not executed
2.//And note in M_yourpane.create (create style in the designation | ws_visible);
The internal operating principle is not analyzed, and it is estimated that there is a problem with CPane's SetWindowPos function. Interested in debugging an MFC source code
Problem two: Eliminate docking position, storage memory function
In CMainFrame, before Createdocablepane, call Cmainframe::enableloaddockstate (FALSE);
Problem three: Remove the Close button in the top right corner of the docking window,
M_ourpane.setcontrolbarstyle (~afx_cbrs_close)
Question four: How to specify a dockable location.
1, at the time of creation, the style parameter Cbrs_bottom \cbrs_left ... Specify the location of the initial display, etc.
2. M_pane can be called after creation. EnableDocking (cbrs_align_any/* any position */); Cbrs_align_left, BOTTOM, etc. specify the position that can be docked in the frame
Note that when you specify certain properties of the Dcoapane control bar (Setcontrolbarstyle (afx_cbrs_resize)), the user cannot drag the dockable window
Question five: How to prevent users from dragging dockable windows
M_pane. Setcontrolbarstyle (afx_cbrs_resize);
Question six: How to compose multiple dockable windows
Please refer to: http://blog.csdn.net/kikaylee/article/details/8936953
How to create multi-function docking windows, as well as to destroy dockable windows, as well as use see: Http://www.codeproject.com/Articles/493218/Understanding-CDockablePane
Personal feel normal display off, no need like codeproject this, every time to create the destruction of dockable windows to show or hide, we recommend the use of member functions, the way to M_pane. ShowWindow (Sw_hide/*sw_show*/) and May.
VC + + MFC SDI/MDI Ribbon Program Docking pane is closed after how to display again