Avoiding sound when not clicking into Modal window

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 ?

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…

1 Like

Wonderful :smiley:

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

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