forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mouse wheel events in clearwin

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
acw



Joined: 04 Nov 2005
Posts: 165
Location: Darkest Devon

PostPosted: Tue Nov 08, 2005 1:54 am    Post subject: Mouse wheel events in clearwin Reply with quote

Hi,

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

Cheers,
Alan
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7927
Location: Salford, UK

PostPosted: Tue Nov 08, 2005 6:19 am    Post subject: Mouse wheel events in clearwin Reply with quote

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
View user's profile Send private message AIM Address
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Mon Oct 09, 2006 10:54 am    Post subject: Mouse wheel events in clearwin Reply with quote

Alan,

Did you have a success?

regards,
John
_________________
John Horspool
Roshaz Software Ltd.
Gloucestershire
Back to top
View user's profile Send private message Visit poster's website
acw



Joined: 04 Nov 2005
Posts: 165
Location: Darkest Devon

PostPosted: Mon Oct 09, 2006 1:39 pm    Post subject: Mouse wheel events in clearwin Reply with quote

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
View user's profile Send private message Visit poster's website
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Mon Oct 09, 2006 4:11 pm    Post subject: Mouse wheel events in clearwin Reply with quote

Alan,

Thanks, that works a treat!

John Smile
_________________
John Horspool
Roshaz Software Ltd.
Gloucestershire
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group