CButton myButton;
// Create an icon button.
myButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_ICON, 
   CRect(10,10,60,50), pParentWnd, 1);// Set the image of the button to be the system arrow and 
// small hourglass cursor.
myButton.SetCursor( ::LoadCursor(NULL, IDC_APPSTARTING) );

解决方案 »

  1.   

    能不能不用定义自己的类,而通过在OnSetCursor中调用
    ::SetCursor来实现啊???
      

  2.   

    重载WM_SETCURSOR消息,加上 SetCursor(AfxGetApp()->LoadCursor(IDC_CURSOR1));
             return true;
    把基类的::OnSetCursor(pWnd, nHitTest, message)去掉。
      

  3.   

    如果你要setcursor可以保存那么窗口类中不能有cursor
      

  4.   

    也就是说注册窗口类的时候,不要指定cursor的据病
      

  5.   

    to ddddh:
    能不能说具体一点??
      

  6.   

    to rememberME:
        可以耶!!!
        不过我用if (pWnd == GetDlgItem(IDC_MYCONTROL))判断光标的pWND时想到
        是不是可以向WM_CTLCOLOR一样对一批同类的控件进行控制呢???
    (最后一问,马上要给分了哦!!!!)