在自定义Dlg中的按钮相应函数中调用CCg200w32View中的函数SaveCurve() ,Dlg的cpp文件写上了
#include "MainFrm.h"
#include "cg200w32Doc.h"
#include "cg200w32View.h"
CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
CCg200w32View *m_pView = (CCg200w32View *)pFrame->GetActiveView();
m_pView->SaveCurve();
但是结果报错:missing ';' .....
怎么回事?如何修改?
答案解析:
工程名:MyTest
--------------MainFrm.cpp *************CMainFrame
#include "stdafx.h"
#include "MyTest.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
---------------MyTest.cpp *******************CMyTestApp
#include "stdafx.h"
#include "MyTest.h