Thread: Help with windows api cursor

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    5

    Thumbs up Help with windows api cursor

    I got an Idea to change the cursor to a resource cursor when the dialogue box is open or when the mouse is over it...Either one would be much apriciated...Code

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    For MS Dev Studio WIN32 API

    int ChangeMouseCursor(HWND hWnd,int Cursor)
    {
    HCURSOR hCursor;

    if(Cursor==ZOOM)
    {
    hCursor=LoadCursor(NULL,(IDC_SIZEALL));
    SetClassLong(hWnd,GCL_HCURSOR,(long)hCursor);
    SetCursor(hCursor);
    return ZOOM;//#defined value is returned
    }
    else if(Cursor==CROSS)


    IDC_SIZEALL is a standard cursor in MS dev Studio. Look up the help on LoadCursor

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    That code will work in any compiler, not must Visual C++.
    // Gliptic

  4. #4
    Unregistered
    Guest

    THANKS

    THANK YOU MUCH!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Want to learn Windows API for Game Programming
    By George M. in forum Windows Programming
    Replies: 15
    Last Post: 09-28-2008, 10:26 AM
  2. Windows API
    By valaris in forum Windows Programming
    Replies: 7
    Last Post: 08-01-2008, 12:37 AM
  3. Windows API - Controlling other windows
    By Asmyldof in forum Windows Programming
    Replies: 11
    Last Post: 11-06-2006, 08:05 AM
  4. Future of Windows API programming ?
    By Dev in forum Windows Programming
    Replies: 7
    Last Post: 04-22-2003, 11:21 PM
  5. Help with editor windows with win api
    By NightStalker in forum Windows Programming
    Replies: 1
    Last Post: 03-13-2003, 03:53 AM