如下图 首先CMainFrame是C*View类的父类
1、CView类调用CMainFrame
添加头文件 #include “MainFrm.h”
void CGisTestView::OnDraw(CDC pDC)
{
CGisTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// _MoveWindow();
// _OpenArea();
((CMainFrame *)GetParentFrame())->myView=this;//完成对CMainFrame类的成员变量的设置**
CGisEditView::OnDraw(pDC);
// TODO: add draw code for native data here
}