Skip to main content
GameDev.net gamedev.net
🔒 Locked

Win32 cursor tracking

Started by kernel n bytes Nov 2, 2004 at 5:54 PM 2 replies 350+ views
Original Post
kernel n bytes
kernel n bytes
In Dev-C++ with the win32 API how do I track where the cursor is and where the cursor goes.
chollida1
chollida1
I usually use GetCursorInfo and GetCursorPos.

If you want to track the mouse then you could respond to the WM_MOUSEMOVE messages.

SetCapture to lock the mouse into your window.

Cheers
Chris
CheersChris
daerid
daerid
A more advanced method would be to install a Windows Hook, and hook the mouse messages.
daerid@gmail.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.