Help with windows api cursor

This is a discussion on Help with windows api cursor within the Windows Programming forums, part of the Platform Specific Boards category; I got an Idea to change the cursor to a resource cursor when the dialogue box is open or when ...

  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,859
    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, 07: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, 02:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21