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;
if ( want3D || wxStyleHasBorder(m_windowStyle) )
msStyle |= WS_BORDER;
- m_hWnd = (WXHWND)::CreateWindowEx(exStyle, "COMBOBOX", NULL,
+ m_hWnd = (WXHWND)::CreateWindowEx(exStyle, _T("COMBOBOX"), NULL,
msStyle,
0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
wxGetInstance(), NULL);
- wxCHECK_MSG( m_hWnd, FALSE, "Failed to create combobox" );
+ wxCHECK_MSG( m_hWnd, FALSE, _T("Failed to create combobox") );
/*
-#if CTL3D
+#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl(wx_combo);
// Subclass again for purposes of dialog editing mode
SubclassWin(m_hWnd);
- SetFont(* parent->GetFont());
+ SetFont(parent->GetFont());
int i;
for (i = 0; i < n; i++)
{
}
if (singletons > 0)
{
- char *tmp = new char[len + singletons + 1];
+ wxChar *tmp = new wxChar[len + singletons + 1];
int j = 0;
for (i = 0; i < len; i ++)
{
delete[] tmp;
}
else
- SetWindowText((HWND) GetHWND(), (const char *)value);
+ SetWindowText((HWND) GetHWND(), (const wxChar *)value);
}
// Clipboard operations
SendMessage(hWnd, WM_CUT, (WPARAM)0, (LPARAM)0);
// Now replace with 'value', by pasting.
- wxSetClipboardData(wxDF_TEXT, (wxObject *)(const char *)value, 0, 0);
+ wxSetClipboardData(wxDF_TEXT, (wxObject *)(const wxChar *)value, 0, 0);
// Paste into edit control
SendMessage(hWnd, WM_PASTE, (WPARAM)0, (LPARAM)0L);