BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
if(!m_wndSplitter.CreateStatic(this,1,2))
return FALSE; if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView),
CSize(228, 100), pContext) ||
!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRightView),
CSize(100, 100), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
为什么运行这个就出错。我的CLeftView是从CFormView继承而来,我的CRightView也是从CFormView继承而来,编译都没问题,就是运行出错,还会出现创建空文档失败的错误。
return TRUE;// return CFrameWnd::OnCreateClient(lpcs, pContext);
}
{
// TODO: Add your specialized code here and/or call the base class
if(!m_wndSplitter.CreateStatic(this,1,2))
return FALSE; if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView),
CSize(228, 100), pContext) ||
!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRightView),
CSize(100, 100), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
为什么运行这个就出错。我的CLeftView是从CFormView继承而来,我的CRightView也是从CFormView继承而来,编译都没问题,就是运行出错,还会出现创建空文档失败的错误。
return TRUE;// return CFrameWnd::OnCreateClient(lpcs, pContext);
}
解决方案 »
- 发送报文后,Cache-Control: private的问题
- 关于 VC Socket 编程问题,求各位指点
- 关于COLEDateTime如何使用
- 请问如何把一个程序放到另一个程序里启动?
- lp前缀 仅仅就是point的优美写法 不是long point的意思吗??
- 如何获取硬盘容量等相关信息(容量,型号...)?
- vc怎么才能学的好啊
- 我的程序需要带参数,我该怎么做好呢?欢迎讨论
- 大侠们帮我改下完成以下功能代码好么??
- 菜鸟学做游戏,有问题不懂,问之,请高手回答 (一)
- ******大家帮忙看段代码,完成端口的,接收有问题,在线等。。。******
- boundschecker 6.5与VC6.0集成问题
我的两个对话框里,在CLeftView里添加了一个Tree控件,而在第二个CRightView里添加了一个List控件。为什么执行到第二个if语句就出错呢。
具体到这段程序,好象是RUNTIME_CLASS的问题。
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
BOOL ret=m_wndSplitter.CreateStatic(this,1,2);
ret|=m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView),
CSize(228, 100), pContext);
ret|=m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRightView),
CSize(100, 100), pContext);
return ret;
}
不要用那么多的if