X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/caf448e3e19c0fcd6593e47138fe31a82e8c8a8d..9f01395e41a6e4c7360e9bdc5b6232238cbf95c2:/src/msw/combobox.cpp diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index e61f41c12b..c8fd88ae27 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,23 @@ int wxComboBox::GetSelection() const return wxChoice::GetSelection(); } +void wxComboBox::Clear() +{ + wxChoice::Clear(); + m_selectionOld = -1; + m_value.clear(); +} + +// ---------------------------------------------------------------------------- +// overridden wxChoice methods +// ---------------------------------------------------------------------------- + +void wxComboBox::SetSelection(int n) +{ + wxChoice::SetSelection(n); + m_selectionOld = n; +} + // ---------------------------------------------------------------------------- // standard event handling // ----------------------------------------------------------------------------