
| 
 | 
|  | 作者: napolun [napolun]  版主 | 登录 | 
| 我初学vc++,编一个鼠标追踪程序,错误是error C2227: left of '->m_pMainWnd' must point to class/struct/union 源程序是: static char output[20]; CMainFrame*pFrame=(CMainFrame*)(AfxGetApp->m_pMainWnd); CStatusBar *pStatus=&pFrame->m_wndStatusBar; if(pStatus) { sprintf(output,"(%d,%d)",point.x,point.y); pStatus->SetPaneText(2,output); } CView::OnMouseMove(nFlags, point); 请指教,谢谢。 | 
| 地主 发表时间: 09/25 21:24 | 
|  | 回复: jhrs123321 [jhrs123321]  论坛用户 | 登录 | 
| AfxGetApp不是变量,是一个函数AfxGetApp(); | 
| B1层 发表时间: 09/26 10:09 | 
|  | 回复: napolun [napolun]  版主 | 登录 | 
| 对不起,改成AfxGetApp()后错误更多了。 | 
| B2层 发表时间: 09/26 22:09 | 
| 
 | 
20CN网络安全小组版权所有
Copyright ©    2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon   

粤ICP备05087286号