可以在MOUSEMOVE中设置:
SetCursor(LoadCursor(..));否则会一闪而过

解决方案 »

  1.   

    谢谢各位,不过在窗口的某区域内RECT怎样使鼠标变化?
      

  2.   

    响应WM_MOUSEMOVE,然后判断鼠标位置是否在矩形中,然后SetCursor()
      

  3.   

    自定义按钮类,然后响应WM_MOUSEMOVE
      

  4.   


    BOOL CTest111Dlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) 
    {
    // TODO: Add your message handler code here and/or call default
    SetCursor(AfxGetApp()->LoadCursor(IDC_CURSOR1)); 
    return TRUE;
    }
      

  5.   

    BOOL CShDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) 
    {
    switch (pWnd->GetDlgCtrlID ())
    {
    case  IDC_STATIC1:
    {
                 SetCursor(AfxGetApp()->LoadCursor(IDC_CURSOR1)); 
    }
    case  IDC_STATIC2:
    {
    SetCursor(AfxGetApp()->LoadCursor(IDC_CURSOR2)); 
    }
    default:
    {
    SetCursor(AfxGetApp()->LoadCursor(IDC_CURSOR2));  }
    }
    return true;
    }