X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4322df68b099e5e983acc0a3dad4ad5841b57b5..129b8b1a215fc1fcc1b9f06daa0aeaf22bbce614:/src/msw/combobox.cpp diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index fca1afd0ca..e6e3af1bd4 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -367,6 +367,30 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id) return true; } +bool wxComboBox::MSWShouldPreProcessMessage(WXMSG *pMsg) +{ + // prevent command accelerators from stealing editing + // hotkeys when we have the focus + if (wxIsCtrlDown()) + { + WPARAM vkey = pMsg->wParam; + + switch (vkey) + { + case 'C': + case 'V': + case 'X': + case VK_INSERT: + case VK_DELETE: + case VK_HOME: + case VK_END: + return false; + } + } + + return wxChoice::MSWShouldPreProcessMessage(pMsg); +} + WXHWND wxComboBox::GetEditHWND() const { // this function should not be called for wxCB_READONLY controls, it is