MFC鼠标显示坐标的问题

[复制链接]
查看11 | 回复2 | 2012-7-12 19:29:18 | 显示全部楼层 |阅读模式
MFC很久没写了,忘的差不多了,不过看你的程序CStatusBar*pStatusBar=&(pFrame->m_wndStatusBar);为什么要取地址,通过pFrame->m_wndStatusBar得到的就是地址吧。把&去掉应该就行了。或者直接改成这样
CMainFrame*pFrame=(CMainFrame*)AfxGetApp()->m_pMainWnd;
CString str;
str.Format("x:%d,y:%d",point.x,point.y);
(pFrame->m_wndStatusBar)->SetPaneText(1,str...
回复

使用道具 举报

千问 | 2012-7-12 19:29:18 | 显示全部楼层
看看CMainFrame中的OnCreate(LPCREATESTRUCT lpCreateStruct)中有没有类似的代码,if (!m_wndStatusBar.Create(this) ||!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UIN...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行