From ffb1629fba05ba7639b766e7fb6dd21464167eeb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 16 Dec 2004 13:25:54 +0000 Subject: [PATCH] suppress annoying beeps when enter is pressed in combobox and there is no default button git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/combobox.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 2d9092f666..aad9581f87 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -270,7 +270,13 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam) InitCommandEvent(event); event.SetString(GetValue()); event.SetInt(GetSelection()); - ProcessCommand(event); + if ( ProcessCommand(event) ) + { + // don't let the event through to the native control + // because it doesn't need it and may generate an annoying + // beep if it gets it + return true; + } } return HandleChar(wParam, lParam, true /* isASCII */); -- 2.45.2