]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
Added configure patch for DEC
[wxWidgets.git] / src / msw / combobox.cpp
index ab5eb3ef41bd008176f15ee94a7d623afa564aa1..7f2f67ad41ff7a39f87475d33553db7c4fe302a5 100644 (file)
@@ -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;