+ -
当前位置:首页 → 问答吧 → MFC基于CFormView的视图不能分割成两部分么?

MFC基于CFormView的视图不能分割成两部分么?

时间:2011-11-27

来源:互联网

C/C++ code

#include "FormDoc.h"
#include "FormView.h"
#include "NewView.h"

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
    // TODO: Add your specialized code here and/or call the base class
    if(m_wndSplitter1.CreateStatic(this,1,2)==NULL) 
        return FALSE;
    
    m_wndSplitter1.CreateView(0,0,RUNTIME_CLASS(CTestView),CSize(100,100), pContext); 
    m_wndSplitter1.CreateView(0,1,RUNTIME_CLASS(CNewView),CSize(100,100),pContext);
    return TRUE;
//    return CFrameWnd::OnCreateClient(lpcs, pContext);
}


编译没错了
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!

Program: C:\Documents and Settings\Administrator\桌面\Form\Debug\Form.exe
File: viewform.cpp
Line: 69

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
---------------------------
终止(A) 重试(R) 忽略(I)  
---------------------------

作者: dingxz105090   发布时间: 2011-11-27

viewform.cpp Line 69是和对话框模板有关,检查你的资源

作者: jiangsheng   发布时间: 2011-11-28