在CXXview 类中添加OnMouseMove鼠标映射函数在函数中添加以下代码:
void CPointView::OnMouseMove(UINT nFlags, CPoint point)
{// TODO: Add your message handler code here and/or call default
CString str;
str.Format("X=%d,Y=%d",point.x,point.y);
((CMainFrame*)GetParent())->m_wndStatusBar.SetWindowText(str);
CView::OnMouseMove(nFlags,point);
}