if(IDCANCEL == dlg.DoModal()){
return
}
CString filePath = dlg.GetFilePathName()
首先从对话框的按钮处理槐迹函数中型明腊获得mainframe指针cmainframe *pmain=(cmaimframe *)afxgetapp()->m_pmainwnd
然后获得相应视图指针cyourview *pview=(cyourview *)pmain->getactiveview()
最后获得视图对应的当前文档指针 cdocument * pcurrentdoc =(cframewnd *)m_pmainwnd->卜滑getactivedocument()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)