mfc窗口分割问题

来源:百度知道 编辑:UC知道 时间:2024/07/16 19:02:23
源码:
if(m_wndSplitter.CreateStatic(this,1,2)==NULL)
return FALSE;

m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CMyfirstmfcView),CSize(100,100), pContext);

if(m_wndSplitter1.CreateStatic(&m_wndSplitter,3,1,WS_CHILD|WS_VISIBLE,
m_wndSplitter.IdFromRowCol(0,1))==NULL)
return FALSE;

m_wndSplitter1.CreateView(0,1,RUNTIME_CLASS(CMyfirstmfcView),CSize(400,400),pContext);

m_wndSplitter1.CreateView(1,1,RUNTIME_CLASS(CMyfirstmfcView),CSize(400,400),pContext);
m_wndSplitter1.CreateView(2,1,RUNTIME_CLASS(Cchildwin3),CSize(400,400),pContext);
return TRUE;
变量均已定义,编译无问题,运行弹出对话框,debug assertion fail.

希望你把源代码打包以后发上来我看看。这个不调试不知道问题出在哪。楼上两位朋友,我觉得你们有点像在乱说话。

CMyfirstmfcView Cchildwin3 都必须是自己另外定义的视图类,你一定是把默认生成的那个弄上了。

有可能stdafx.h中没有#include <afxcview.h>