+ SendMessage(GetHwnd(), WM_PASTE, 0, 0L);
+}
+
+void wxComboBox::Undo()
+{
+ if (CanUndo())
+ {
+ HWND hEditWnd = (HWND) GetEditHWND() ;
+ if ( hEditWnd )
+ ::SendMessage(hEditWnd, EM_UNDO, 0, 0);
+ }
+}
+
+void wxComboBox::Redo()
+{
+ if (CanUndo())
+ {
+ // Same as Undo, since Undo undoes the undo, i.e. a redo.
+ HWND hEditWnd = (HWND) GetEditHWND() ;
+ if ( hEditWnd )
+ ::SendMessage(hEditWnd, EM_UNDO, 0, 0);
+ }
+}
+
+void wxComboBox::SelectAll()
+{
+ SetSelection(0, GetLastPosition());
+}
+
+bool wxComboBox::CanUndo() const
+{
+ if (!IsEditable())
+ return false;
+
+ HWND hEditWnd = (HWND) GetEditHWND() ;
+ if ( hEditWnd )
+ return ::SendMessage(hEditWnd, EM_CANUNDO, 0, 0) != 0;
+ else
+ return false;
+}
+
+bool wxComboBox::CanRedo() const
+{
+ if (!IsEditable())
+ return false;
+
+ HWND hEditWnd = (HWND) GetEditHWND() ;
+ if ( hEditWnd )
+ return ::SendMessage(hEditWnd, EM_CANUNDO, 0, 0) != 0;
+ else
+ return false;
+}
+
+bool wxComboBox::HasSelection() const
+{
+ long from, to;
+ GetSelection(&from, &to);
+ return from != to;
+}
+
+bool wxComboBox::CanCopy() const
+{
+ // Can copy if there's a selection
+ return HasSelection();
+}
+
+bool wxComboBox::CanCut() const
+{
+ return IsEditable() && CanCopy() ;
+}
+
+bool wxComboBox::CanPaste() const
+{
+ if ( !IsEditable() )
+ return false;
+
+ // Standard edit control: check for straight text on clipboard
+ if ( !::OpenClipboard(GetHwndOf(wxTheApp->GetTopWindow())) )
+ return false;
+
+ bool isTextAvailable = ::IsClipboardFormatAvailable(CF_TEXT) != 0;
+ ::CloseClipboard();
+
+ return isTextAvailable;
+}
+
+bool wxComboBox::IsEditable() const
+{
+ return !HasFlag(wxCB_READONLY);