-
Nasty 'Bing' Sound
Hi
I subclassed an Edit control to get notified if the user presses return in it. This so far works fine, but everytime I type something in the edit and press return, it plays the window standard signal wave (when unchanged the nasty 'bing') before processing the input.
My question is, does someone know why it plays that sound and how I can avoid it?
cheers,
PrivatePanic
-
That is the notorious sound that the edit is NOT getting the key press. Search these board with the keywords "GetWindowLong" and "SetWindowLong" for a good explanation on the matter...
-
Erm yeah I know there's plenty topics about subclassing... I read em, but I still don't know why my subclassed edit plays that sound.
- The editproc function checks if <return> is pressed and if so, does some stuff and returns CallWindowProc.
- Or, if it was another key that was pressed, just return CallWindowProc without doing the stuff.
So there shouldn't be any difference except the stuff is run or not; and the stuff doesn't produce that sound. So I have no idea why that sound is played.
-
You can eliminate the problem a lot of the time by having your "Ok" (or whatever) button as your default push button.
-
Well it's no Dialog, it's a normal Window.
The subclassing iself works fine, as I said... and if it will 'bing' everytime, fine, it's not a problem either, but if someone knows a possibility to get rid of it, I'll use it ;)