X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/caf448e3e19c0fcd6593e47138fe31a82e8c8a8d..a45d2855c6882edc830777de2cec9ac21caced61:/src/msw/combobox.cpp?ds=sidebyside diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index e61f41c12b..d85ef7e887 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "combobox.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -328,7 +324,7 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam) return false; } -bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) +bool wxComboBox::MSWCommand(WXUINT param, WXWORD id) { wxString value; int sel = -1; @@ -398,10 +394,14 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) ProcessCommand(event); } break; + + default: + return wxChoice::MSWCommand(param, id); } - // there is no return value for the CBN_ notifications, so always return - // false from here to pass the message to DefWindowProc() + // let the def window proc have it by returning false, but do not pass the + // message we've already handled here (notably CBN_SELCHANGE) to the base + // class as it would generate another event for them return false; } @@ -748,6 +748,13 @@ int wxComboBox::GetSelection() const return wxChoice::GetSelection(); } +void wxComboBox::Clear() +{ + wxChoice::Clear(); + m_selectionOld = -1; + m_value.clear(); +} + // ---------------------------------------------------------------------------- // standard event handling // ----------------------------------------------------------------------------