Link to home
Start Free TrialLog in
Avatar of PMH4514
PMH4514

asked on

Hiding the mouse cursor

I did a search on this, but don't think I found what I was looking for.

Using VC++ 6.0, what is the mose appropriate way to hide the mouse cursor? I found one thread that would move the pointer off screen to the lower right, but wouldn't that keep the actual mouse location there? Note, I do not want to disable the mouse, or otherwise affect the  WM_MOUSEMOVE and associated message paramaters that represent the mouse location, the user will still be using the mouse, but I am capturing the movement, and rather than showing a cursor, drawing a graphical cross-hair overlay on the screen (not a cursor per say) that follows it, so I need to simply make the system mouse cursor invisible, but affect it in no other way. The overlay stuff is all working, so I just need to make the system cursor invisible (and of course be able to turn it back on as well :)

Thanks!
-Paul
Avatar of jkr
jkr
Flag of Germany image

What about using

ShowCursor(FALSE); // hide

//...

ShowCursor(TRUE); // show again

?
Avatar of PMH4514
PMH4514

ASKER

oh..

simple enough! I thought I'd have to use DirectX or replace it with a transparent empty bitmap or something.

:)

-Paul

ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PMH4514

ASKER

ShowCursor(FALSE) makes it disappear, but ShowCursor(TRUE) doesn't seem to bring it back.

-Paul
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PMH4514

ASKER

>> You need to 'balance' the calls
Ahh.. I see.


AlexFM's solution worked perfectly.