Code: Select all
BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
if(! m_wndSplitter.CreateStatic(this, 1, 3))return FALSE;
if(! m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CSplittTestView), CSize(lpcs->cx / 3, 0), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
if(! m_wndSplitter.CreateView(0,2,RUNTIME_CLASS(CTest4View),CSize(lpcs->cx / 3,0),pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
if(! m_wndSplitter2.CreateStatic(&m_wndSplitter,3,1,WS_CHILD | WS_VISIBLE | WS_BORDER,m_wndSplitter.IdFromRowCol(0,1)))
{
m_wndSplitter2.DestroyWindow();
return FALSE;
}
if(! m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CTest1View),CSize(lpcs->cx / 3,100),pContext))
{
m_wndSplitter2.DestroyWindow();
return FALSE;
}
if(! m_wndSplitter2.CreateView(1,0,RUNTIME_CLASS(CTest2View),CSize(lpcs->cx / 3,100),pContext))
{
m_wndSplitter2.DestroyWindow();
return FALSE;
}
if(! m_wndSplitter2.CreateView(2,0,RUNTIME_CLASS(CTest3View),CSize(lpcs->cx / 3,0),pContext))
{
m_wndSplitter2.DestroyWindow();
return FALSE;
}
// return CMDIChildWnd::OnCreateClient(lpcs, pContext);
return TRUE;
}
Code: Select all
virtual BOOL CreateView( int row, int col, CRuntimeClass* pViewClass, SIZE sizeInit, CCreateContext* pContext );