View previous topic :: View next topic |
Author |
Message |
acw
Joined: 04 Nov 2005 Posts: 165 Location: Darkest Devon
|
Posted: Tue Nov 08, 2005 1:54 am Post subject: Mouse wheel events in clearwin |
|
|
Hi,
Is there any way of handling mouse wheel events in clearwin/win32 ?
Cheers,
Alan |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7927 Location: Salford, UK
|
Posted: Tue Nov 08, 2005 6:19 am Post subject: Mouse wheel events in clearwin |
|
|
Alan
The mouse wheel is currently implemented for %eb and %ht only.
However, you could try to do your own processing via %mg. |
|
Back to top |
|
|
JohnHorspool
Joined: 26 Sep 2005 Posts: 270 Location: Gloucestershire UK
|
Posted: Mon Oct 09, 2006 10:54 am Post subject: Mouse wheel events in clearwin |
|
|
Alan,
Did you have a success?
regards,
John _________________ John Horspool
Roshaz Software Ltd.
Gloucestershire |
|
Back to top |
|
|
acw
Joined: 04 Nov 2005 Posts: 165 Location: Darkest Devon
|
Posted: Mon Oct 09, 2006 1:39 pm Post subject: Mouse wheel events in clearwin |
|
|
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
|
|
Back to top |
|
|
JohnHorspool
Joined: 26 Sep 2005 Posts: 270 Location: Gloucestershire UK
|
Posted: Mon Oct 09, 2006 4:11 pm Post subject: Mouse wheel events in clearwin |
|
|
Alan,
Thanks, that works a treat!
John _________________ John Horspool
Roshaz Software Ltd.
Gloucestershire |
|
Back to top |
|
|
|