用messagebox cstring.format太麻烦
BOOL GetCursorPos(
LPPOINT lpPoint // address of structure for cursor position
);
在对话框中放一静态文本, IDC_STATIC1
void CtestDlg::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CString str;
str.Format("%d,%d",point.x,point.y);
GetDlgItem(IDC_STATIC1)->SetWindowText(str);
CtestDlg::OnMouseMove(nFlags, point);
}
这样就不会疯了!