onMouseWheel (hWnd, delta, x, y)
This callback is invoked when the mouse wheel is rotated.
Parameter | Description |
---|---|
hWnd | The handle to the window which had input focus when the mouse wheel was rotated. |
delta | The distance and direction the wheel was rotated, see remarks for more information |
x | The x coordinate where the wheel was rotated. Relative to the upper left hand corner of the window |
y | The y coordinate where the wheel was rotated. Relative to the upper left hand corner of the window |
0
This is a callback function. You must supply this function yourself. Register this callback with the WinXRegOnMouseWheel function.
If the delta parameter is positive, the mouse was rotated up, if it is negative, the mouse was rotated down. delta is always a multiple or division of 120. The scrolling of a single line is supposed to occur only when delta has reached 120. If delta is smaller than 120, you should add it to a static variable and not scroll untill that variable reaches 120. Alternatively you could scroll partial lines. If it is larger than 120 you should scroll several lines.
FUNCTION onMouseWheel (hWnd, delta, x, y)
END FUNCTION |