Sign in to follow this  
neodasan

how can I measure mouse movement distance?

Recommended Posts

neodasan    126
I am trying to measure how many miles users's mouse cursor travel. is there any good way to do that? I was trying to use RAWINPUT, but its x and y values doesn't make sense to me. Thank you.

Share this post


Link to post
Share on other sites
jyk    2094
Quote:
I am trying to measure how many miles users's mouse cursor travel. is there any good way to do that? I was trying to use RAWINPUT, but its x and y values doesn't make sense to me.
What do you mean by 'miles'? Are you trying to measure the accumulated 'real' distance that the cursor travels onscreen, or something of that sort?

Share this post


Link to post
Share on other sites
neodasan    126
Quote:
Original post by jyk
What do you mean by 'miles'? Are you trying to measure the accumulated 'real' distance that the cursor travels onscreen, or something of that sort?




Oops sorry. I meant that Distance is equal to the number of pixels. We don't need to convert pixels to real length.

How can I measure the number of pixels if i have some absolute values?

Share this post


Link to post
Share on other sites
Vortez    2714
Easy enough, use 2 variables to hold the current mouse position, on the next mouse move message, substrack those value with the new one, replace the variables value with the new one.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this