
我只是在MFC的窗口的指定矩形区域中改变了一下光标,最大化窗口后窗口内容没有重回,标题栏还在原来的地方,怎么刷新啊
void CMouseView::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CRect rect(100,100,800,500);
if(rect.PtInRect(point))
{
::SetCursor(m_hcursor);
}
else
::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_NO));
//Invalidate(); //刷新窗口,以便其重绘,如果不刷新窗口会导致跟随过程会有移动的轨迹出现
CView::OnMouseMove(nFlags, point);
}
BOOL CMouseView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// TODO: Add your message handler code here and/or call default
CClientDC *pDC = new CClientDC(this);
m_hcursor=AfxGetApp()->LoadCursor(IDC_GREEN);
//SetCursor(cur);
return CView::OnSetCursor(pWnd, nHitTest, message);
}