急啊!在线等!很基本的问题!关于状态栏的!
我是用MFC EXE WIZARD生成的基本应用程序。
要修改状态栏中的信息,要显示信息的状态栏为:ID_SHOW,在CMainFrame中创建了个函数为void Disp,属性为Public
void CMainFrame::Disp(CString s)
{
m_wndStatusBar.SetPaneText(m_wndStatusBar.CommandToIndex(ID_SHOW),s);
}
现在的问题是:
我要监视鼠标移动操作,而鼠标的WM_MOUSEMOVE消息处理是在CView类中完成的,
void CXXView::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CView::OnMouseMove(nFlags, point);
CString sPos;
sPos.Format("(%d,%d)",point.x,point.y);
//这里我要调用CMainFrame中的Disp显示坐标,如何实现?
//CMainFrame::Disp(sPos);//是错误的,正确如何写啊?
}