在OnMouseMove(UINT nFlags, CPoint point) 事件里
CString str;
str.Format("鼠标位置x=%d:y=%d",point.x,point.y);
SetWindowText(str); //在标题栏显示鼠标坐标
GetDlgItem(IDC_STATIC1)->SetWindowText(str);
在OnMouseMove(UINT nFlags, CPoint point) 事件里
CString str;
str.Format("鼠标位置x=%d:y=%d",point.x,point.y);
SetWindowText(str); //在标题栏显示鼠标坐标
GetDlgItem(IDC_STATIC1)->SetWindowText(str);
相关文章: