Joris Huizer wrote:
Why not like
- SystemParametersInfoW(SPI_GETWHEELSCROLLLINES,0,
&pulScrollLines, 0);
- gcWheelDelta = GET_WHEEL_DELTA_WPARAM(wParam);
- if (gcWheelDelta >= WHEEL_DELTA && pulScrollLines)
nPos += pulScrollLines * (-gcWheelDelta / WHEEL_DELTA) * 8;
just seems simpler;
It doesn't work quite that way. GET_WHEEL_DELTA_WPARAM() can return both positive and negative numbers so the abs() is still essential.
It's a question of taste whether to put it on to:
gcWheelDelta -= GET_WHEEL_DELTA_WPARAM(wParam);
or on to:
nPos += pulScrollLines * (-gcWheelDelta / WHEEL_DELTA) * 8;
Me, I like the first one but I don't really care one way or the other.
- Hannu Valtonen Hannu.Valtonen@hut.fi