单应用程序获得文档类对象指针和获得视图类对象指针办法
获得View指针:
POSITION pos = this->GetFirstViewPosition();
CPointCloudMeasureView *pView = NULL;
if(pos)
pView = (CPointCloudMeasureView *)this->GetNextView(pos);
else
ASSERT(false);
获得view指针的关键在于GetFirstViewPosition函数和GetNextView函数;
获得Doc指针:
CDocument* pDoc = ((CFrameWnd*)AfxGetMainWnd())->GetActiveDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return false;