Silverfrost Forums

Welcome to our forums

Mouse wheel events in clearwin

8 Nov 2005 12:54 #429

Hi,

Is there any way of handling mouse wheel events in clearwin/win32 ?

Cheers, Alan

8 Nov 2005 5:19 #430

Alan

The mouse wheel is currently implemented for %eb and %ht only. However, you could try to do your own processing via %mg.

9 Oct 2006 9:54 #1131

Alan,

Did you have a success?

regards, John

9 Oct 2006 12:39 #1132

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

9 Oct 2006 3:11 #1133

Alan,

Thanks, that works a treat!

John 😃

Please login to reply.