|
-
May 25th, 2005, 06:17 AM
#1
visibility of mouse cursor
I've read that ShowCursor(false) makes the mouse cursor invisible. But unfortunately only in my own application! I would like to switch it of everywhere. No visible mouse cursor!
I'm already searching for quite a long time. With no success.
Please help.
-
May 25th, 2005, 06:21 AM
#2
Re: visibility of mouse cursor
it only work on yor app and its ok.
if you want to change it per all app you should consider using the ::SetSystemCursor(..) api that what i would do.
Cheers
Shahar
-
May 25th, 2005, 06:41 AM
#3
Re: visibility of mouse cursor
Thank you Shahar,
I didn't want to change the systems cursor.
And in the case of SetSystemCursor(..) I would have to set
every single system cursor (hourglass, arrow, ..) to something
invisible.
Isn't there a way to make it just invisble instead of replacing it?
-
May 25th, 2005, 06:48 AM
#4
Re: visibility of mouse cursor
well you can do another thing, you can set a mouse hook function:
::SetWindowsHookEx ( ) with the WH_MOUSE_LL parameter and on each callback from the hook set the x,y paramters to unvisiable coordinates and then your mouse will never appear on screen, no matter what app is running.
Cheers
Shahar
-
May 25th, 2005, 07:12 AM
#5
Re: visibility of mouse cursor
Yes, I also thought of this solution.
But I want to leave the cursor where it is.
The mouse should still work, invisible.
To me it seems incredible how it can be
so difficult to simply make the cursor invisible.
-
May 25th, 2005, 10:15 AM
#6
Re: visibility of mouse cursor
i have simple solution for you:
RECT rc;
this->GetWindowRect(&rc);
::ClipCursor(&rcClip);
::ShowCursor(0);
after that you wont see the cursor i am promising you :-)
Cheers
Shahar
-
May 25th, 2005, 12:24 PM
#7
Re: visibility of mouse cursor
Cool idea...
But unfortunately the mouse will be restricted to
a very small part of the desktop (&rcClip) and
can not be moved freely.
-
May 26th, 2005, 01:23 AM
#8
Re: visibility of mouse cursor
but you wanted it to be HIdden? so what do you care? now i dont really understand what you want :-(
Cheers
Shahar
-
June 2nd, 2005, 03:16 PM
#9
Re: visibility of mouse cursor
I would like to use the mouse as usual but without seeing the cursor. The obviously needed visual feedback(current position of the cursor) will come from other sources. No matter what kind of sources.
-
June 2nd, 2005, 05:00 PM
#10
Re: visibility of mouse cursor
I suggest that you use your own cursor system, only in your application window (using SetCursor(NULL)).
Even, if you can modify the cursor for all applications, that is very bad, because applications like text editor or image editor, generally need their own cursors.
For example it is good that an image editor has a cursor indicating the type of operation (brush, pen, zoom, fill, duplicate, selection, etc.)
If you remove this cursor and replace it by your own cursor system, it will be very bad for the user, because only one cursor will be used for all tools of all applications.
If your application is a game, you can allow the user to run it in fullscreen mode for a better immersion in the game, but in windowed mode the cursor must be normal when the mouse get out of the window.
-
June 4th, 2005, 08:18 AM
#11
Re: visibility of mouse cursor
I agree. Dont mess with system cursor, there is a reason there is no API to hide it. Are you trying to replace whole Windows with your own system ?!
Can you tell us WHY do you want to hide it ?
-
December 2nd, 2005, 12:20 AM
#12
Re: visibility of mouse cursor
hey guys,
You can hide the mouse cursor completely so that it will not be visible when ur mouse crosses ur application window boundaries as follows:
Use SetCapture() to capture the mouse..and then use ShowCursor(false)
Pls make sure that you read ShowCursor in MSDN first...
By doing this only and only ur app receives the mouse events...don't worry...
you can even route the messages to other apps by using ::GetWindowFromPoint and ::PostMessage.....u need to convert the mouse coordinates into screen coordinates for this....use ClientToScreen()..
Using System wide Mouse Hooks is another solution
Anand.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|