Re: Mouse Wheel Events
- Posted by Derek Parnell <ddparnell at bigpond.com> Apr 03, 2003
- 317 views
On Thu, 03 Apr 2003 00:18:38 -0500, Greg Haberek <g.haberek at comcast.net> wrote: > > I've recently been updating a program from onXXX to setHandler(). The > program used to catch > Mouse Wheel Events through the shift parameter of onMouse. Now with > setHandler, the Mouse Wheel > triggers a WM_MOUSEWHEEL message, but how do I determine whether it was > up or down? With > onMouse, the shift parameter would be #780000 for up and -#780000 for > down. Now what happens? > You're correct. I must update win32lib to provide this information. In the meantime you can get it by doing this... procedure onMouse_XXX(integer self, integer event, sequence parms) sequence lRaw atom lDist lRaw = getLastMsg(0) lDist = (hi_word(lRaw[4]) / 120) if lDist < 0 then -- wheel down (towards user) else -- wheel up (away from user) end if end procedure -- cheers, Derek Parnell