[futurebasic] Re: [FB] How to intercept mouse wheel event in standard handler windows?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : July 2005 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Tue, 26 Jul 2005 00:46:21 +1200
Bernie wrote:

>>> All my windows have the standard handler attribute and the mouse  
>>> wheel works great for scrolling controls such as data browsers.  
>>> What I really hate is that when the cursor is over a browser in  
>>> an inactive window, the browser still scrolls.
>>> How can we block the mouse event for inactive windows?
>>> Installing _kEventMouseWheelMoved on the application or the  
>>> windows and returning _noErr doesn't help as it appears that this  
>>> event is called *after* the event... so to speak.
>> My guess is that your handler is not being called at all. Try  
>> installing it on the control.
> I think it's being called, but *after* the scrolling has taken  
> place. Here's a slightly modified SVV demo which shows the problem.

I don't have a mouse wheel to test. Does it work any differently if  
you install the handler on the scroll view instead of the image view?
   err = fn InstallControlHandler( scrollView )
That seems more natural. If it doesn't work, then I am stumped.

Robert P.

P.S. To compile your example I had to pass it through the freeware  
app TextWrangler to remove non-breaking spaces (with the well-named  
Zap Gremlins command).