X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3324be240257cb1a97c439616a1d58cb3b437cc..b3031762e87338b20e682af9278731aec1d123c6:/src/msw/combobox.cpp diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index cdda376aee..1b795f43e6 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -38,7 +38,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) { if (param == CBN_SELCHANGE) { - wxCommandEvent event(wxEVENT_TYPE_COMBOBOX_COMMAND, m_windowId); + wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId); event.SetInt(GetSelection()); event.SetEventObject(this); event.SetString(copystring(GetStringSelection())); @@ -46,6 +46,15 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) delete[] event.GetString(); return TRUE; } + else if (param == CBN_EDITCHANGE) + { + wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId); + event.SetString(copystring(GetValue())); + event.SetEventObject(this); + ProcessCommand(event); + delete[] event.GetString(); + return TRUE; + } else return FALSE; } @@ -63,7 +72,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, if (parent) parent->AddChild(this); SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; SetForegroundColour(parent->GetDefaultForegroundColour()) ; - no_strings = n; + m_noStrings = n; m_windowStyle = style;