Sign in to follow this  
_Phalanx_

Question about lZ in the DIMOUSESTATE struct

Recommended Posts

_Phalanx_    180
Hey, I am having a problem with the lZ data. When i go one click backwards, it is giving me 0xFFFFFF88 and when i go one click forwards it gives me 0x00000078. I just am not sure what this data means and how to use it. I want to use the mouse wheel to scroll thru available weapons in my game. THanks [Edited by - _Phalanx_ on October 18, 2004 7:58:48 AM]

Share this post


Link to post
Share on other sites
IFooBar    906
You get the lZ data just as you'd get the lX and lY data, and it is a relative value that tells you how much the mouse wheel has turned since your last poll. so if lZ had the value 20 in it, that would be the mouse wheel turned 20 degrees anticlockwise (figuratively speaking)

Share this post


Link to post
Share on other sites
_Phalanx_    180
So whats the clicking on the mouse wheel about, it cant just be degrees because one "click" is the smallest increment.

also, when i go one click backwares lZ = 0xfffffff8
and when i go one click forwards lZ = 0x00000078

so this makes no sence to me at all, whats the problem?

Share this post


Link to post
Share on other sites
Pipo DeClown    804
Either it's something the OS (Windows) controls, or you can set it somewhere with the options, how large the 'jump' is for one 'click'.

0xFFFFFFF8 = (signed long int)-120;
0x00000078 = (signed long int)+120;

So they're the distance moved (relatives) since the last call to GetDeviceState().

Share this post


Link to post
Share on other sites
IFooBar    906
If you go into your control panel and into the mouse settings options. See the Mouse Wheel tab? It has an option to specify the number of lines per "click". I think 3 is default. and I think lZ returns a value of 40. So if you have your mouse wheel option set to 3 lines, that would be 40 per line and 120 per click.

Not a 100% sure though.

Share this post


Link to post
Share on other sites
_Phalanx_    180
Your right, im an idiot, I had it set to hexidecimal display. But hey, Now i have another question. How do i know what the user has set the lines per click to? i mean i can dived by 120 to find out how many clicks, but if someone set it differently, it would be screwed up.

[Edited by - _Phalanx_ on October 18, 2004 1:09:48 AM]

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