Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Mouse Cursors

  • 26-05-2004 10:09AM
    #1
    Registered Users, Registered Users 2 Posts: 1,253 ✭✭✭


    Hey everyone....

    Okay so I am doing some work experience at the moment. (In Germany)

    I have to develop a Visual C++ application. The core application is working and all I have left at this stage is some smaller issues. One of these issues is about changing the mouse cursor.

    One of the features of my application is a 'Search' facility where the application searches for certain files containing certain data. I want the mouse cursor to change to a wait cursor or one of those half wait, half arrow cursors when the search is being performed.

    I have looked through the help files quite a bit and anything that I do find is either rubbish or way over my head. I have also looked around on the net with little sucess.

    Can somebody point me in the right direction or even explain to me how to do this. Bear in mind that when the search is over the cursor should return to normal.

    Thanks a million in advance!!


Comments

  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo


    Should be simple enough:

    HCURSOR previousCursor=GetCursor();
    HCURSOR waitCursor=LoadCursor(NULL,IDC_WAIT);

    //when it's time to wait...
    SetCursor(waitCursor);

    //and when its finished waiting...
    SetCursor(previousCursor);


  • Registered Users, Registered Users 2 Posts: 1,253 ✭✭✭gobby


    Excellent. Prompt reply and it works a dream!

    Thanks so much satchmo!

    [edit] Hehe... You might be sorry though. I have a ton of other questions! [/edit]


  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo


    Heheh ah.... oh look, what's that over there?!

    (*legs it*)


Advertisement