// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "combobox.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
return false;
}
-bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
+bool wxComboBox::MSWCommand(WXUINT param, WXWORD id)
{
wxString value;
int sel = -1;
ProcessCommand(event);
}
break;
+
+ default:
+ return wxChoice::MSWCommand(param, id);
}
- // there is no return value for the CBN_ notifications, so always return
- // false from here to pass the message to DefWindowProc()
+ // let the def window proc have it by returning false, but do not pass the
+ // message we've already handled here (notably CBN_SELCHANGE) to the base
+ // class as it would generate another event for them
return false;
}
{
if (!IsEditable())
return false;
-
+
HWND hEditWnd = (HWND) GetEditHWND() ;
if ( hEditWnd )
return ::SendMessage(hEditWnd, EM_CANUNDO, 0, 0) != 0;
{
if (!IsEditable())
return false;
-
+
HWND hEditWnd = (HWND) GetEditHWND() ;
if ( hEditWnd )
return ::SendMessage(hEditWnd, EM_CANUNDO, 0, 0) != 0;
// Paste into edit control
SendMessage(GetHwnd(), WM_PASTE, (WPARAM)0, (LPARAM)0L);
+#else
+ wxUnusedVar(from);
+ wxUnusedVar(to);
+ wxUnusedVar(value);
#endif
}
return wxChoice::GetSelection();
}
+void wxComboBox::Clear()
+{
+ wxChoice::Clear();
+ m_selectionOld = -1;
+ m_value.clear();
+}
+
+// ----------------------------------------------------------------------------
+// overridden wxChoice methods
+// ----------------------------------------------------------------------------
+
+void wxComboBox::SetSelection(int n)
+{
+ wxChoice::SetSelection(n);
+ m_selectionOld = n;
+}
+
// ----------------------------------------------------------------------------
// standard event handling
// ----------------------------------------------------------------------------