Hi,
Is there any way of handling mouse wheel events in clearwin/win32 ?
Cheers, Alan
Welcome to our forums
Hi,
Is there any way of handling mouse wheel events in clearwin/win32 ?
Cheers, Alan
Alan
The mouse wheel is currently implemented for %eb and %ht only. However, you could try to do your own processing via %mg.
Alan,
Did you have a success?
regards, John
Yes indeed. Simply handle the WM_MOUSEWHEEL message directly using %mg:
integer, parameter:: WM_MOUSEWHEEL = Z'020A' external OnMouseWheel
...
i = winio@('%mg&', WM_MOUSEWHEEL, OnMouseWheel)
and get the wheel scroll values from WPARAM in OnMouseWheel:
wparam = clearwin_info@('MESSAGE_WPARAM') wheel_rot = HIWORD@(wparam) / 120 ! rotations reported as *120
Alan
Alan,
Thanks, that works a treat!
John 😃