SendInput and wheel movement

Hi,

I've got a problem with simulating wheel-movement in the SendInput function.
I get my wheel to move forwards, but i have no idea on how to move it backwards.

from MSDN reference:

mouseData
Type: DWORD
If dwFlags contains MOUSEEVENTF_WHEEL, then mouseData specifies the amount of wheel movement. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as WHEEL_DELTA, which is 120.


so mouseData specifies the wheel movement, and negative values indicate a backward rotation. But it is from type DWORD, so it can only contain positive values?!

How do i simulate negative wheel movement?

pls help

edit1: btw. thats how my code looks right now. (with -1 < RY < 1 )
1
2
3
4
5
6
INPUT in;
in.type = INPUT_MOUSE;
in.mi.dwFlags = MOUSEEVENTF_WHEEL;
in.mi.mouseData = RY * 120;
in.mi.time = 0;
SendInput(1, &in, sizeof(in));


edit2: my code above is working (i accidentially exluded negative values of RY myself), but i still dont get why.
Last edited on
Topic archived. No new replies allowed.