16,550
社区成员
发帖
与我相关
我的任务
分享
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: 在此添加专用代码和/或调用基类
CRect rt;
GetClientRect(rt);
if(m_splitter.CreateStatic(this,1,2)==NULL)
return false;
m_splitter.CreateView(0,0,RUNTIME_CLASS(CDrawBorderView),CSize(rt.Width()-200,rt.Height()), pContext);
m_splitter.CreateView(0,1,RUNTIME_CLASS(CFormTreeView),CSize(200,rt.Height()), pContext);
return true;
//return CFrameWnd::OnCreateClient(lpcs, pContext);
}
//要不按照如下的试试
//CMainFrame* pMF=(CMainFrame*)AfxGetMainWnd(); 改成如下:
CMainFrame* pMF=(CMainFrame*)AfxGetApp()->m_pMainWnd;
class CMainFrame;
class CDrawBorderView: public CView
{
..
}
{