How to maintain splitter size
Can someone suggest how to maintain the splitter view size when the program
is sizeed or maximized or minimized? I am using nested splitter with 2 rows;
2 columns on row 0. When the program starts (Minimized) I set the initial
size for row 0,column 1 to 200 less than max width. When the program is
Maximized, column 1 does not maintain the same width. I do not want to
block sizing the splitter; just maintain the same view size for column 1
when the application is sized. Here is code I use to set the initial size
which works ok.
thanks
void CMainFrame::OnSize(UINT nType, int cx, int cy)
{
CFrameWnd::OnSize(nType, cx, cy);
/************************************************************/
/* NOTE: m_bInit is set in OnCreateClient() after the views */
/* have been created. */
/************************************************************/
if ( m_bInit ) // only execute once so the splitter is not always the same
size
{
m_bInit = FALSE;
m_wndSplitter1.SetRowInfo( 0, cy/*-150*/, 0 ); // Hidden
m_wndSplitter1.RecalcLayout();
m_wndSplitter2.SetColumnInfo( 0, cx-200, 0 ); // make right column 200
less than max
m_wndSplitter2.RecalcLayout();
}
}