Thread: changing mouse cursor

  1. #1

    changing mouse cursor


    I'm making a simple game with Open Gl And Windows. My game needs to be able to change the mouse pointer depending on where abouts it is but I cant find out how to do it. Please Help...:
    Heres what i've got:
    //boring code above/..
    if (mpos.y < 5) //if mouse at top screen I want to change to arrow upwards
    Y -= 0.25f; //move screen UP
    //here change mouse cursor to data/cursors/up_arrow.ico - or bmp.
    //I think i have to change wc.hCursor = LoadCursor(NULL, ???);

    thanks for your help !

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    try the SetCursor() function:

    SetCursor(LoadCursor(NULL, IDC_IBEAM));

  3. #3

    thanks but...

    I was meaning change the cursor to one in the file data/icons/test.ico. How do you load a cursor and then use it?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. get visible mouse cursor height
    By eXistenZ in forum Windows Programming
    Replies: 10
    Last Post: 09-05-2008, 09:46 PM
  2. Getting the position of the mouse cursor
    By Mavix in forum Game Programming
    Replies: 5
    Last Post: 12-27-2007, 04:02 PM
  3. Program that moves mouse cursor and clicks
    By chongo in forum C++ Programming
    Replies: 6
    Last Post: 09-08-2003, 03:50 PM
  4. How to change a mouse cursor in console mode
    By GaPe in forum Windows Programming
    Replies: 10
    Last Post: 07-03-2002, 07:42 AM