MouseWheel problem since 1.46


since version 1.46 none of my custom components derived from juce::Component are getting MouseWheel callbacks under Windows. The only workaround is to add a juce::Slider component and make it visible and suddenly my components are getting the MouseWheel events. If I remove the “dummy Slider” wheel doesn’t work anymore. In version 1.45 my components worked properly.
Anything known of a “bug in juce_win32_Windowing”? Because without the dummy Slider

LRESULT peerWindowProc(...) ... case 0x020A: /* WM_MOUSEWHEEL */ doMouseWheel (wParam, true); return 0; case 0x020E: /* WM_MOUSEHWHEEL */ ...

are never reached?

After hours of debugging, still no idea what goes wrong.

Thanks for any help.


Maybe all of your components are set to not want keyboard focus? If the window doesn’t have focus, I think that the OS might not send it any wheel events. Adding a slider (which does want key focus) would be enough to persuade it to grab the focus.

Bull’s eye!
That was the problem. Thanks a lot Jules. You made my day.

No problem. That “not-getting-a-scroll-event-unless-the-window-is-focused” behaviour is definitely one of the most irritating things about Vista.