if(!pView->IsKindOf(RUNTIME_CLASS(CEuipment)))
{
m_wndSplitter.DeleteView(0,1);
m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CEuipment),CSize(rcRight.Width(),rcRight.Height()),NULL);
m_wndSplitter.RecalcLayout();
m_pUserinfoView= (CUserinfoView*)m_wndSplitter.GetPane(0,1);
}
CEuipment 类 我是定义的一个CDialog  为什么 出现 错误如下
\TPSQA\MainFrm.cpp(154) : error C2039: 'classCEuipment' : is not a member of 'CEuipment'
        e:\tpsqa\euipment.h(13) : see declaration of 'CEuipment'
E:\TPSQA\MainFrm.cpp(154) : error C2065: 'classCEuipment' : undeclared identifier
E:\TPSQA\MainFrm.cpp(157) : error C2039: 'classCEuipment' : is not a member of 'CEuipment'
        e:\tpsqa\euipment.h(13) : see declaration of 'CEuipment'

解决方案 »

  1.   

    classCEuipment
    是不是你将class CEuipment连在一起写了?
    你贴的代码好像和这个错误没有关系吧
      

  2.   

    包含头文件,如果还不行
    如果可以的话,发到:[email protected]
    我帮你看看!注明帖子的URL!
      

  3.   

    RUNTIME_CLASS(CEuipment)
    这样用的话,必须支持动态创建!
    需要:
    1)间接/直接从cobject继承
    2)头文件中:DECLARE_DYNCREATE(CEuipment)
    3)cpp文件中:IMPLEMENT_DYNCREATE(CEuipment, 基类)
      

  4.   

    RUNTIME_CLASS(CEuipment)
    等价与
    classCEuipment
    但是没有经过楼上的三步,是不会有classCEuipment这个类的!
    你可以看看上面几个宏的定义!
      

  5.   

    2)头文件中:DECLARE_DYNCREATE(CEuipment)
    3)cpp文件中:IMPLEMENT_DYNCREATE(CEuipment, 基类)
    to handwolf(初学者) 
    我加拉这两条 问题就解决拉,太谢谢拉,高手能解释一下吗?
      

  6.   

    DECLARE_DYNCREATE(CEuipment)
    会产生一个类classCEuipment的声明IMPLEMENT_DYNCREATE(CEuipment, 基类)
    会产生一个类classCEuipment的定义,然后插到动态创建类链表中!好象是这样的,看过久了!
      

  7.   

    这些 在创建的时候,系统应该自动加上啊,为什么 基类是 CTreeView 和其他的都有,而基类是CDialog 却没有,不好意思,我刚学没多久,想问个明白,见笑拉