这是一个多文档的问题
以下三个类,是由MFC自动生成的

class CMy3DApp : public CWinApp
class CMy3DDoc : public CDocument
class CMy3DView : public CView而后,我又加了一个类 Cmy3DView1111:: public CMy3DView问题便出现在了这里,就是在实例华视图文件模板的时候 BOOL CMy3DApp::InitInstance(){/***********
I want a new view-documnet template, so I add them
***********/CMultiDocTemplate* pDocTemplate1;
pDocTemplate1 = new CMultiDocTemplate(
IDR_MY3DTYPE,
RUNTIME_CLASS(CMy3DDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CMy3DView1111)); //Problem is here
AddDocTemplate(pDocTemplate);/***********
***********/}
VC6.0 的报错是
error C2039: 'classCMy3DView1111' : is not a member of 'CMyOpenGLView'd:\练习\3d\cmyopenglview.h(14) : see declaration of 'CMy3DView1111'
error C2065: 'classCMyOpenGLView' : undeclared identifier
另外,在拆分窗口的时候也出现了错误 
this->sp1.CreateStatic(this,2,2,WS_CHILD|WS_VISIBLE,AFX_IDW_PANE_FIRST);
sp1.CreateView(0,0,RUNTIME_CLASS(CMy3DView1111),panSize,pContext); //Problem is here
sp1.CreateView(0,1,RUNTIME_CLASS(CMy3DView),panSize,pContext);
sp1.CreateView(1,0,RUNTIME_CLASS(CMy3DView),panSize,pContext);
sp1.CreateView(1,1,RUNTIME_CLASS(CMy3DView),panSize,pContext);error C2039: 'classCMy3DView1111' : is not a member of 'CMyOpenGLView'd:\练习\3d\cmyopenglview.h(14) : see declaration of 'CMy3DView1111'
: error C2065: 'classCMyOpenGLView' : undeclared identifier应该怎么解决呢

解决方案 »

  1.   

    是要View的信息么// CMy3DView1111.h: interface for the CMyOpenGLView class.
    //
    //////////////////////////////////////////////////////////////////////#if !defined(AFX_MY3DOPENGLVIEW_H__9C1877A6_BC21_47FD_B4BE_2BEFABC236A7__INCLUDED_)
    #define AFX_MY3DOPENGLVIEW_H__9C1877A6_BC21_47FD_B4BE_2BEFABC236A7__INCLUDED_#if _MSC_VER > 1000
    #pragma once
    #endif // _MSC_VER > 1000#include "3DView.h"class CMy3DView1111: public CMy3DView  
    {
    public:
    CMy3DView1111();
    virtual ~CMy3DView1111();};#endif // !defined(AFX_MY3DOPENGLVIEW_H__9C1877A6_BC21_47FD_B4BE_2BEFABC236A7__INCLUDED_)