X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f11220943f14b4bb5190db0dfd0054304f5015c..90e586840b79c936751bf8305ea4f51c6c283791:/src/msw/combobox.cpp?ds=sidebyside diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index ab5eb3ef41..7f2f67ad41 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -41,21 +41,22 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId); event.SetInt(GetSelection()); event.SetEventObject(this); - event.SetString(copystring(GetStringSelection())); + event.SetString(GetStringSelection()); ProcessCommand(event); - delete[] event.GetString(); + return TRUE; } else if (param == CBN_EDITCHANGE) { wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId); - event.SetString(copystring(GetValue())); + event.SetString(GetValue()); event.SetEventObject(this); ProcessCommand(event); - delete[] event.GetString(); + return TRUE; } - else return FALSE; + else + return FALSE; } bool wxComboBox::Create(wxWindow *parent, wxWindowID id, @@ -72,7 +73,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, if (parent) parent->AddChild(this); SetBackgroundColour(parent->GetBackgroundColour()) ; SetForegroundColour(parent->GetForegroundColour()) ; - m_noStrings = n; + m_noStrings = 0; m_windowStyle = style;