在VC6.0中,怎样获得当前光标的状态,就是那种鼠标成箭头或是移动时的十字等等的状态

解决方案 »

  1.   

    BOOL GetCursorInfo(
      PCURSORINFO pci  // cursor information
    );
      

  2.   

    hCursor = AfxGetApp()->LoadStandardCursor(IDC_SIZENS);
    CWinApp::LoadStandardCursor 
    HCURSOR LoadStandardCursor( LPCTSTR lpszCursorName ) const;Return ValueA handle to a cursor if successful; otherwise NULL.ParameterslpszCursorNameAn IDC_ manifest constant identifier that specifies a predefined Windows cursor. These identifiers are defined in WINDOWS.H. The following list shows the possible predefined values and meanings for lpszCursorName: IDC_ARROW   Standard arrow cursor
    IDC_IBEAM   Standard text-insertion cursor
    IDC_WAIT   Hourglass cursor used when Windows performs a time-consuming task
    IDC_CROSS   Cross-hair cursor for selection
    IDC_UPARROW   Arrow that points straight up
    IDC_SIZE   Obsolete and unsupported; use IDC_SIZEALL
    IDC_SIZEALL   A four-pointed arrow. The cursor to use to resize a window.
    IDC_ICON   Obsolete and unsupported. Use IDC_ARROW.
    IDC_SIZENWSE   Two-headed arrow with ends at upper left and lower right
    IDC_SIZENESW   Two-headed arrow with ends at upper right and lower left
    IDC_SIZEWE   Horizontal two-headed arrow
    IDC_SIZENS   Vertical two-headed arrow 
    ResLoads the Windows predefined cursor resource that lpszCursorName specifies. 
      

  3.   

    这个是设置用的,不是获得用的
    HCURSOR型的handle我可以得到,但是怎么判断光标的类型呀
      

  4.   

    BOOL GetCursorInfo(
      PCURSORINFO pci  // cursor information
    );
      

  5.   

    Windows NT/2000/XP: Included in Windows NT 4.0 SP6 and later.
      Windows 95/98/Me: Included in Windows 98 and later.
      Header: Declared in Winuser.h; include Windows.h.
      Library: Use User32.lib.
      

  6.   

    The GetCursorInfo function retrieves information about the global cursor.BOOL GetCursorInfo(
      PCURSORINFO pci  // cursor information
    );