Search code examples
c++windowswinapimfccsplitterwnd

MFC: Showing / Hiding Splitter Panes


In my application I have a number of panes from m_wndspliter classes. What I want to do is at run time show and hide one of these panes. Whilst with the following code I can show and hide the view associated with the pane, I can't temporarily remove the pane itself.

CWnd * pCurView = m_wndSplitter2.GetPane(2, 0);
if( !pCurView == NULL )
{
    if( fShow )
    {
        pCurView->ShowWindow(SW_SHOW);
        RecalcLayout();
    }
    else
    {
        pCurView->ShowWindow(SW_HIDE);
        RecalcLayout();
    }
}

Any examples / ideas ?


Solution

  • Does this help?

    http://www.codeguru.com/cpp/w-d/splitter/article.php/c1543

    I have used something very similar myself,