继承类出现问题:程序是doc/view框架的 ,要创建分割窗口
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
if (m_spliterWnd.CreateStatic(this,1,2)==NULL)
return FALSE;
m_spliterWnd.CreateView(0,0,RUNTIME_CLASS(CLeftView),CSize(100,100) ,pContext);
// 以下语句出错
m_spliterWnd.CreateView(0,1,RUNTIME_CLASS(CRightView),CSize(100,100) ,pContext);
return TRUE;}
CRightView 在头文件中是这样定义的: class CRightView :public CPropertyView
.......
出错提示:
error C2039: 'classCRightView' : is not a member of 'CRightView'
若将'CRightView' 改为它的基类 CPropertyView ,通过。
为何 如何解决??
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
if (m_spliterWnd.CreateStatic(this,1,2)==NULL)
return FALSE;
m_spliterWnd.CreateView(0,0,RUNTIME_CLASS(CLeftView),CSize(100,100) ,pContext);
// 以下语句出错
m_spliterWnd.CreateView(0,1,RUNTIME_CLASS(CRightView),CSize(100,100) ,pContext);
return TRUE;}
CRightView 在头文件中是这样定义的: class CRightView :public CPropertyView
.......
出错提示:
error C2039: 'classCRightView' : is not a member of 'CRightView'
若将'CRightView' 改为它的基类 CPropertyView ,通过。
为何 如何解决??
解决方案 »
- 关于openmp的入门程序,大仙们帮忙啊
- 如何更改磁盘驱动器的图标,百分制!嘿
- ATL Control控件中不能捕获键盘消息
- 请问BCGControlBar如何入门???请来说几句吧~感激ing~
- 加上PASCAL关键字可加快程序的运行速度
- Custom Control
- 如何改变CPropertySheet显示的字体?
- ATL新建Service为什么什么操作也不做,全部编译器生成的代码直接注册服务报错。。折磨死我了
- 求如何把一个窗口(主界面)最大化,如果知道句柄的话,另外,最大化的代码加在工程的什么位置比较好?
- MAC帧长度填充问题
- http代理原理,以及如何透过http代理。
- 关于CAsyncSocket和CSocket的疑问
class CRightView : public CPropertyView
{
DECLARE_DYNAMIC(CRightView)
public:
CRightView();
virtual ~CRightView();
//{{AFX_MSG(CRightView)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
.cpp中
IMPLEMENT_DYNAMIC(CRightView, CPropertyView )
BEGIN_MESSAGE_MAP(CRightView, CPropertyView )
//{{AFX_MSG_MAP(CLeftView)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
缺少CRuntimeclass的运行宏定义