| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 726 人关注过本帖
标题:大家帮忙解决问题啊
只看楼主 加入收藏
ghethe
Rank: 1
等 级:新手上路
帖 子:22
专家分:6
注 册:2008-10-23
结帖率:87.5%
收藏
已结贴  问题点数:20 回复次数:2 
大家帮忙解决问题啊
void CEx_SDIView::OnLButtonDblClk(UINT nFlags, CPoint point)
{
    // TODO: Add your message handler code here and/or call default
    CMainFrame * pFrame=(CMainFrame*)AfxGetApp()->m_pMainWnd;
    CStatusBar * pStatus=&pFrame->m_wndStatusBar;
    CString str;
    if(pFrame->m_bIsTest)
   
        str.Format("你在(%d,%d)处双击鼠标",point.x,point.y);
    else
        str.Empty();
    if (pStatus)
        pStatus->SetPaneText(1,str);
    CView::OnLButtonDblClk(nFlags, point);
}
最后运行时出现这样的错误:
F:\ghethe\Ex_SDI\Ex_SDIView.cpp(108) : error C2065: 'CMainFrame' : undeclared identifier
F:\ghethe\Ex_SDI\Ex_SDIView.cpp(108) : error C2065: 'pFrame' : undeclared identifier
F:\ghethe\Ex_SDI\Ex_SDIView.cpp(108) : error C2059: syntax error : ')'
F:\ghethe\Ex_SDI\Ex_SDIView.cpp(109) : error C2227: left of '->m_wndStatusBar' must point to class/struct/union
F:\ghethe\Ex_SDI\Ex_SDIView.cpp(111) : error C2227: left of '->m_bIsTest' must point to class/struct/union
Error executing cl.exe.
Ex_SDI.exe - 5 error(s), 0 warning(s)

帮忙解决一下吧
搜索更多相关主题的帖子: void 鼠标 default message 
2009-09-02 09:40
xufen340
Rank: 9Rank: 9Rank: 9
等 级:蜘蛛侠
帖 子:166
专家分:1351
注 册:2009-8-7
收藏
得分:20 
你要把cwnd*转化为CMainFrame* ,CMainFrame在MainFrm.h中定义,你肯定要
#include "MainFrm.h".
收到的鲜花
  • ghethe2009-09-04 16:53 送鲜花  3朵   附言:我很赞同
2009-09-02 10:13
ghethe
Rank: 1
等 级:新手上路
帖 子:22
专家分:6
注 册:2008-10-23
收藏
得分:0 
回复 2楼 xufen340
对,真是这样的,我大意了,谢谢
2009-09-04 16:52
快速回复:大家帮忙解决问题啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015088 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved