Search code examples
visual-c++mfcmfc-feature-pack

MFC Dockable panes. How to reopen them once closed


While trying to improve my MFC skills, I stumbled upon this very annoying situation. When I close a dockable pane, I am unable to find a way to reopen it again. A search here revealed Owen had the same issue here

Unfortunately, I cannot comment on there, hence this new question. For the record, I've also figured out the registry keys one needs to delete to get the panes again, as pointed out by Christian in that thread. I have also figured out the use of m_bSaveState = FALSE; as pointed out by Papsicle

But I would like to have them shown again from a menu item. Thanks in advance for your replies

I searched through the sample code, and searched online, but I was unable to find an answer


Solution

  • As it turned out it is as simple as per @Constantine Georgiou's comment.

    void CMainFrame::ShowConnectionPane()
    {
        m_wndConnectionView.ShowPane(true, false, true);
    }
    

    Ευχαριστώ πολύ