tags:

views:

171

answers:

1

Hi, is there any way to take control of all the mouse events entirely using mouse hooks? I'm developing an application (VC# exe that is) and I've to fulfill the following requirement: Whenever the application is active, it has to display a virtual cursor instead of the windows cursor and when the user tries to move the mouse, the mouse events have to be transferred to this virtual cursor instead of the windows cursor. So, lets say when the user moves the mouse, the virtual cursor should move instead of the windows cursor.

I've tried to implement this by giving WH_MOUSE as the hook id in SetWindowsHookEx() call, but the problem is that along with the virtual cursor, the windows cursor is moving too.

Is there a way to fulfill my requirement? Any input will be greatly appreciated. Thanks in advance.

A: 

Have you tried using BlockInput?
P.S: use it with care :)

Paolo Tedesco
Hi, using a BlockInput() doesn't seem to work because, I'll still be needing the mouse inputs for my virtual cursor's movement. I just have to make sure that all the mouse events are bypassed and transferred to my virtual cursor instead of the windows cursor. Is there a way to do that?
Carl