]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/choice.cpp
wxMenu and wxMenuBar modifications: now works much better with owner-drawn
[wxWidgets.git] / src / msw / choice.cpp
index a901873db3f5b16cf13d1e541ccc5bbbfb50fa74..5074a31255fe935c00f3557b316fcb87586b2598 100644 (file)
@@ -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,