X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90ac8b50051f0ba0ff92a159f9bc97db80024910..8cb475f139b67c75f744c6060785812082df0758:/src/msw/combobox.cpp diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index e6e3af1bd4..8ced094638 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -326,7 +326,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id) // this string is going to become the new combobox value soon but // we need it to be done right now, otherwise the event handler // could get a wrong value when it calls our GetValue() - ::SetWindowText(GetHwnd(), value); + ::SetWindowText(GetHwnd(), value.wx_str()); { wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, GetId()); @@ -374,7 +374,7 @@ bool wxComboBox::MSWShouldPreProcessMessage(WXMSG *pMsg) if (wxIsCtrlDown()) { WPARAM vkey = pMsg->wParam; - + switch (vkey) { case 'C': @@ -387,7 +387,7 @@ bool wxComboBox::MSWShouldPreProcessMessage(WXMSG *pMsg) return false; } } - + return wxChoice::MSWShouldPreProcessMessage(pMsg); } @@ -680,7 +680,7 @@ void wxComboBox::Replace(long from, long to, const wxString& value) Remove(from, to); // Now replace with 'value', by pasting. - wxSetClipboardData(wxDF_TEXT, (wxObject *)(const wxChar *)value, 0, 0); + wxSetClipboardData(wxDF_TEXT, (wxObject *)value.wx_str(), 0, 0); // Paste into edit control SendMessage(GetHwnd(), WM_PASTE, (WPARAM)0, (LPARAM)0L); @@ -799,12 +799,12 @@ void wxComboBox::OnUpdateRedo(wxUpdateUIEvent& event) void wxComboBox::OnUpdateDelete(wxUpdateUIEvent& event) { - event.Enable(HasSelection() && IsEditable()); + event.Enable(IsEditable() && HasSelection()); } void wxComboBox::OnUpdateSelectAll(wxUpdateUIEvent& event) { - event.Enable(GetLastPosition() > 0); + event.Enable(IsEditable() && GetLastPosition() > 0); } #endif // wxUSE_COMBOBOX