]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
fix PCH-less compilation
[wxWidgets.git] / src / msw / combobox.cpp
index 3c6fe8d103708121118cc8c57d2de6ff4f989b78..e6e3af1bd4a75652bd792d245d929a4b68debfcf 100644 (file)
@@ -265,7 +265,7 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
             {
                 if (SendMessage(GetHwnd(), CB_GETDROPPEDSTATE, 0, 0))
                     return false;
-            
+
                 wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
 
                 const int sel = GetSelection();
@@ -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