X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce3ed50dbe32d118321082db84c3a9abb047d5b7..c16e5a9271ab576a76c8537b67e0f5e25f90bc67:/src/msw/choice.cpp?ds=sidebyside diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 26b67c9d36..5074a31255 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -38,12 +38,13 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId); event.SetInt(GetSelection()); event.SetEventObject(this); - event.SetString(copystring(GetStringSelection())); + event.SetString(GetStringSelection()); ProcessCommand(event); - delete[] event.GetString(); + return TRUE; } - else return FALSE; + else + return FALSE; } bool wxChoice::Create(wxWindow *parent, wxWindowID id, @@ -59,7 +60,7 @@ bool wxChoice::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; @@ -94,7 +95,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, wxCHECK_MSG( m_hWnd, FALSE, "Failed to create combobox" ); /* -#if CTL3D +#if wxUSE_CTL3D if (want3D) { m_useCtl3D = TRUE; @@ -180,7 +181,7 @@ wxString wxChoice::GetString(int n) const return wxString(wxBuffer); } -void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) +void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY);