关于MFC分割窗口的问题。
这是我的代码:CSingleDocTemplate*pDocTemplate;pDocTemplate=newCSingleDocTemplate(IDR_MAINFRA...
这是我的代码:
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CHelloDoc),
RUNTIME_CLASS(CMainFrame),
RUNTIME_CLASS(CHelloView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);
m_Splitter1.CreateStatic(this,1,2);
m_Splitter1.CreateView(0,0,RUNTIME_CLASS(CView1), CSize(100,0), pContext);
m_Splitter2.CreateStatic(&m_Splitter1,2,1,WS_CHILD|WS_VISIBLE|WS_BORDER, m_Splitter1.IdFromRowCol(0, 1));
m_Splitter2.CreateView(0,0,RUNTIME_CLASS(CView2), CSize(0,100), pContext);
m_Splitter2.CreateView(1,0,RUNTIME_CLASS(CView3), CSize(0,100), pContext);
总共有4个view,我想的应该显示后面三个view,但是还是显示CHelloView ,这是怎么回事
qq 372035250 展开
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CHelloDoc),
RUNTIME_CLASS(CMainFrame),
RUNTIME_CLASS(CHelloView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);
m_Splitter1.CreateStatic(this,1,2);
m_Splitter1.CreateView(0,0,RUNTIME_CLASS(CView1), CSize(100,0), pContext);
m_Splitter2.CreateStatic(&m_Splitter1,2,1,WS_CHILD|WS_VISIBLE|WS_BORDER, m_Splitter1.IdFromRowCol(0, 1));
m_Splitter2.CreateView(0,0,RUNTIME_CLASS(CView2), CSize(0,100), pContext);
m_Splitter2.CreateView(1,0,RUNTIME_CLASS(CView3), CSize(0,100), pContext);
总共有4个view,我想的应该显示后面三个view,但是还是显示CHelloView ,这是怎么回事
qq 372035250 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询