#include "wx/setup.h"
#endif
-#if USE_COMBOBOX
+#if wxUSE_COMBOBOX
#include "wx/combobox.h"
#include "wx/clipbrd.h"
{
if (param == CBN_SELCHANGE)
{
- wxCommandEvent event(wxEVENT_TYPE_COMBOBOX_COMMAND, m_windowId);
+ wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId);
event.SetInt(GetSelection());
event.SetEventObject(this);
event.SetString(copystring(GetStringSelection()));
delete[] event.GetString();
return TRUE;
}
+ else if (param == CBN_EDITCHANGE)
+ {
+ wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
+ event.SetString(copystring(GetValue()));
+ event.SetEventObject(this);
+ ProcessCommand(event);
+ delete[] event.GetString();
+ return TRUE;
+ }
else return FALSE;
}
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
- no_strings = n;
+ m_noStrings = n;
m_windowStyle = style;
return TRUE;
}
-wxString wxComboBox::GetValue(void) const
+wxString wxComboBox::GetValue() const
{
- GetWindowText((HWND) GetHWND(), wxBuffer, 500);
- return wxString(wxBuffer);
+ return wxGetWindowText(GetHWND());
}
void wxComboBox::SetValue(const wxString& value)
}
// Clipboard operations
-void wxComboBox::Copy(void)
+void wxComboBox::Copy()
{
HWND hWnd = (HWND) GetHWND();
SendMessage(hWnd, WM_COPY, 0, 0L);
}
-void wxComboBox::Cut(void)
+void wxComboBox::Cut()
{
HWND hWnd = (HWND) GetHWND();
SendMessage(hWnd, WM_CUT, 0, 0L);
}
-void wxComboBox::Paste(void)
+void wxComboBox::Paste()
{
HWND hWnd = (HWND) GetHWND();
SendMessage(hWnd, WM_PASTE, 0, 0L);
*/
}
-void wxComboBox::SetInsertionPointEnd(void)
+void wxComboBox::SetInsertionPointEnd()
{
/*
long pos = GetLastPosition();
*/
}
-long wxComboBox::GetInsertionPoint(void) const
+long wxComboBox::GetInsertionPoint() const
{
/*
DWORD Pos=(DWORD)SendMessage((HWND) GetHWND(), EM_GETSEL, 0, 0L);
return 0;
}
-long wxComboBox::GetLastPosition(void) const
+long wxComboBox::GetLastPosition() const
{
/*
HWND hWnd = (HWND) GetHWND();
void wxComboBox::Replace(long from, long to, const wxString& value)
{
-#if USE_CLIPBOARD
+#if wxUSE_CLIPBOARD
HWND hWnd = (HWND) GetHWND();
long fromChar = from;
long toChar = to;
}
#endif
- // USE_COMBOBOX
+ // wxUSE_COMBOBOX