19,468
社区成员
发帖
与我相关
我的任务
分享
void CPOINT1View::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CClientDC dc(this);
CRect rect;
InvalidateRect(&rect);
//dc.FillRect(&rect,WHITE_BRUSH);
GetClientRect(&rect);
dc.MoveTo(0,point.y);
dc.LineTo(rect.Width(),point.y);
//InvalidateRect(&rect);
dc.MoveTo(point.x,0);
dc.LineTo(point.x,rect.Height());
CString str;
str.Format(_T("x=%d y=%d"),point.x,point.y);
((CMainFrame*)GetParent())->m_wndStatusBar.SetWindowText(str);
//Invalidate();
CView::OnMouseMove(nFlags, point);
}