BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
//return CFrameWnd::OnCreateClient(lpcs, pContext);
bCreateSuccess = m_wndHorSplitter.CreateStatic(this, 1, 2);
if (!bCreateSuccess)
{
TRACE0("Failed to Split HorizontalSplitter Window/n");
return FALSE;
}
bCreateSuccess = m_wndVerSplitter.CreateStatic(&m_wndHorSplitter, 2, 1,
WS_CHILD|WS_VISIBLE, m_wndHorSplitter.IdFromRowCol(0,0));
if (!bCreateSuccess)
{
TRACE0("Failed to Split VerticalSplitter Window/n");
return FALSE;
}
CRect rcClient;
GetClientRect(&rcClient);
int cxRect = rcClient.Width();
int cyRect = rcClient.Height();
bCreateSuccess = m_wndVerSplitter.CreateView(1, 0, RUNTIME_CLASS(CTelnetView), CSize(cxRect*1/5,cyRect*1/3), pContext);
if (!bCreateSuccess)
{
TRACE0("Failed to Create TelnetView/n");
return FALSE;
}
bCreateSuccess = m_wndVerSplitter.CreateView(0, 0, RUNTIME_CLASS(CSetupView), CSize(cxRect*1/5,cyRect*2/3), pContext);
if (!bCreateSuccess)
{
TRACE0("Failed to Create SetupView/n");
return FALSE;
}
bCreateSuccess = m_wndHorSplitter.CreateView(0, 1, RUNTIME_CLASS(CEasyNMView), CSize(cxRect*4/5,cyRect), pContext);
if (!bCreateSuccess)
{
TRACE0("Failed to Create TreeView/n");
return FALSE;
}
return TRUE;
}