void CDsDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CFdfdDoc* pDoc;
CMainFrame *pMain=(CMainFrame *)AfxGetApp()->m_pMainWnd;
CFdfdView *pView=(CFdfdView *)pMain->GetActiveView();
(CFdfdDoc*) pDoc=pView->GetDocument();
}编译没有错误,为什么在运行时点击该按钮出错呢?
{
// TODO: Add your control notification handler code here
CFdfdDoc* pDoc;
CMainFrame *pMain=(CMainFrame *)AfxGetApp()->m_pMainWnd;
CFdfdView *pView=(CFdfdView *)pMain->GetActiveView();
(CFdfdDoc*) pDoc=pView->GetDocument();
}编译没有错误,为什么在运行时点击该按钮出错呢?
解决方案 »
- 求助:DeviceObject->DeviceQueue 得到的是对象还是指针?
- 求 Visual Assist X 10.3注册码
- 请教一个调用问题(40分)
- 怎么用vc访问网页http://202.102.29.155/qxtweb/sendmessage.jsp?sp_code=2004444&username=test&password=test&tomobile=05126186109&ms
- 斑主呼吁
- 新手请教数据库连接问题
- 请问怎么样打印VIEW中加载的BMP图象
- 300分求多线程解决哲学家进餐问题的源码
- 安装在IE中的控件如何截获往IE中拖放文件的事件,用IE如何上传文件?
- OpenGL函数与范例解析手册.pdf 英文版//的下载地址是什么?
- vc6.0打包的问题
- 开发一个局域网的数据共享软件,能不能使用虚拟机
CDocument * pCurrentDoc =(CFrameWnd *)m_pMainWnd->GetActiveDocument();
获取当前文档指针,
也提示错误啊
error C2065: 'm_pMainWnd' : undeclared identifier
error C2227: left of '->GetActiveDocument' must point to class/struct/union
获取当前文档指针,
也提示错误啊
error C2065: 'm_pMainWnd' : undeclared identifier
error C2227: left of '->GetActiveDocument' must point to class/struct/union