16,472
社区成员
发帖
与我相关
我的任务
分享
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
bool bCreated = m_wndSplitter.CreateStatic(this,1,2); //建立外层架构,一行两列
bCreated = m_wndLeftSplitter.CreateStatic( //建立内层架构,两行一列
&m_wndSplitter, //以外层splitter为父窗体
2,1,
WS_CHILD|WS_VISIBLE,
m_wndSplitter.IdFromRowCol(0,1) //指定新的splitter占据外层架构的左方格
);
m_wndLeftSplitter.CreateView(
0,0,
RUNTIME_CLASS(COtdrClientView),
CSize(0,0),
pContext
);
m_wndLeftSplitter.CreateView(
1,0,
RUNTIME_CLASS(CEventView),
CSize(0,0),
pContext
);
m_wndSplitter.CreateView(
0,0,
RUNTIME_CLASS(CLeftView),
CSize(0,0),
pContext
);
m_pClientView = (COtdrClientView*)m_wndLeftSplitter.GetPane(0,0);
m_pLeftView = (CLeftView*)m_wndSplitter.GetPane(0,0);
m_pEventView = (CEventView*)m_wndSplitter.GetPane(0,0);
//m_pEventView->SetWindowTextA("报警");
m_bSpliterCreated = bCreated;
return bCreated;
}