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,
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetBackgroundColour()) ;
SetForegroundColour(parent->GetForegroundColour()) ;
- m_noStrings = n;
+ m_noStrings = 0;
m_windowStyle = style;
wxCHECK_MSG( m_hWnd, FALSE, "Failed to create combobox" );
/*
-#if CTL3D
+#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl(wx_combo);