BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
// create a splitter with 1 row, 2 columns
CRect rect;
long width, height;
ShowWindow(SW_SHOWMAXIMIZED);
GetClientRect(&rect);
width = rect.right-rect.left;
height = rect.bottom-rect.top;
if (!m_wndSplitter.CreateStatic(this, 1, 2,WS_CHILD | WS_VISIBLE))
{
TRACE("Failed to CreateStaticSplitter\n");
return FALSE;
}
// First splitter pane
if (!m_wndSplitter.CreateView(0, 0,
RUNTIME_CLASS(CMyView), CSize(width-160,height), pContext))
{
TRACE("Failed to create command view pane\n");
return FALSE;
}
if (!m_wndSplitter.CreateView(0, 1,
RUNTIME_CLASS(CFormCommandView), CSize(160,height), pContext))
{
TRACE("Failed to create command view pane\n");
return FALSE;
}
// Second splitter pane