You can see the sample I had posted in this thread : Win32 C++; How to use mouse wheel to zoom in and zoom out of picture in the client area of the application window?
How can I get the scroll direction and sensitivity from WM_MOUSECROLL?
![](https://techprofile.blob.core.windows.net/images/CFIB-zqfp0esdKGTs5ax_A.png?8DA8BE)
thebluetropics
1,046
Reputation points
I tried to build a scrollable container with Direct2D, I know how to do that. I need to handle mouse scroll, as far as I know, the easiest way is to handle the WM_MOUSESCROLL message.
Here is my try:
UINT direction = HIWORD(wparam);
I used a debugger to see if it works, but its not. the variable direction
always have a value 224
, which is weird, even If I scroll both up and down.
What I want to achieve is:
- Get the scroll direction, up or down
- Get the scroll sensitivity, how much pixels it will be each scroll