如何得到单文档视图类的指针??
fly@ 2008-10-13 10:49:37 在自己的对话框类中,如何得到单文档视图的指针,
CSettingDlg::CSettingDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSettingDlg::IDD, pParent)
{
CMainFrame *pFrame = (CMainFrame*)AfxGetMainWnd();
GraphicView *pGraphicView = (GraphicView*)pFrame->GetActiveView();
}
//提示说error C2065: 'CGraphicView' : undeclared identifier
加了头文件#include "Graphicview.h",错误更多,
又在 Graphicview.h 文件中报错, CGraphicDoc* GetDocument();//error C2143: syntax error : missing ';' before '*'
怎么回事啊 ,是头文件位置不正确否?谢谢了