- wxCommandEvent event(wxEVENT_TYPE_COMBOBOX_COMMAND, m_windowId);
- event.SetInt(GetSelection());
+ if (GetSelection() > -1)
+ {
+ wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId);
+ event.SetInt(GetSelection());
+ event.SetEventObject(this);
+ event.SetString(GetStringSelection());
+ ProcessCommand(event);
+ }
+
+ return TRUE;
+ }
+ else if (param == CBN_EDITCHANGE)
+ {
+ wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
+ event.SetString(GetValue());