Avoiding sound when not clicking into Modal window


#1

I created a modal dialog using DialogWindow::showModalDialog().
When I press the mouse button anywhere outside the modal window, then there´s this annoying Windows sound “bing” that is played. I know this is default Windows behaviour; but is there any way to get rid of this sound in JUCE ?


#2

Yes, you can override the Component::inputAttemptWhenModal() method, where it does the beep.

But thinking about it, a neat way of handling this would be by adding a beep() method to the look and feel, so it could be customised. That’s easy to do, I’ll add it shortly…


#3

Wonderful :smiley:

…coz that Windows Beep Sound is one of the things I hate most about Windows…


#4

I’ve already done that change now, and checked it in…


#5