]> git.saurik.com Git - wxWidgets.git/commitdiff
suppress annoying beeps when enter is pressed in combobox and there is no default...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 16 Dec 2004 13:25:54 +0000 (13:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 16 Dec 2004 13:25:54 +0000 (13:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/combobox.cpp

index 2d9092f6663922d0a9fd07f12a706fc9121ab771..aad9581f874eaca2b8ea8a785e407938ab244d78 100644 (file)
@@ -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 */);