]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
moved HasTransparentBackground() from wxUniv to common wxWindow
[wxWidgets.git] / src / msw / combobox.cpp
index 2d9092f6663922d0a9fd07f12a706fc9121ab771..a9bb62cb5eb9ecbf4b996e7e51e7b902e79d4c80 100644 (file)
@@ -251,6 +251,7 @@ WXLRESULT wxComboBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
                 m_value = wxEmptyString;
             else
                 m_value = GetString(wParam);
+            m_selectionOld = -1;
             break;
     }
 
@@ -270,7 +271,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 */);