Re: Mouse Wheel Events

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu