Reputation: 1370
I need to obtain the mouse move event values (id est mouse_delta_x, mouse_delta_y) but without moving the mouse cursor (should off It at all) Just need to use mouse movement but without side effect of moving the windows cursor. I know I could possibly do it with RawInput but I am seeking for easiest way. Can it be done easy in winapi?
(It is needed for moving camera in 3d game)
Upvotes: 1
Views: 829
Reputation: 162164
Can it be done easy in winapi?
Not per se, as the Win32 API assumes the pointer to be at a position on the screen – if the pointer hits a screen edge it won't move further. What you can do is after receiving a mouse move event sending the pointer pack to the screen center and ignore the mouse move event created by this pointer warp.
If you don't want to jump that hoop, you'll have to use RawInput or DirectInput for this.
Upvotes: 3