]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix generation of wxEVT_CHAR in wxMSW wxComboBox.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 29 Jun 2012 23:55:54 +0000 (23:55 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 29 Jun 2012 23:55:54 +0000 (23:55 +0000)
wxEVT_CHAR shouldn't be generated at all if wxEVT_KEY_DOWN was handled but it
still was for wxComboBox because the code in its MSW implementation directly
called HandleKeyDown() and HandleChar() methods, bypassing the logic dealing
with m_lastKeyDownProcessed at wxWindow level.

Fix this by calling MSWHandleMessage() instead to ensure that WM_CHAR after a
handled WM_KEYDOWN are ignored as they ought to.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/combobox.cpp

index beb740ac71c00c7400160c4b9866e33f169e2539..03bda9b166d8e421bae13579c3c37ca323fbeb90 100644 (file)
@@ -238,26 +238,18 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
             // fall through
 
         case WM_SYSCHAR:
-            return HandleChar(wParam, lParam);
-
         case WM_SYSKEYDOWN:
         case WM_KEYDOWN:
-            return HandleKeyDown(wParam, lParam);
-
         case WM_SYSKEYUP:
         case WM_KEYUP:
-            return HandleKeyUp(wParam, lParam);
-
         case WM_SETFOCUS:
-            return HandleSetFocus((WXHWND)wParam);
-
         case WM_KILLFOCUS:
-            return HandleKillFocus((WXHWND)wParam);
-
         case WM_CUT:
         case WM_COPY:
         case WM_PASTE:
-            return HandleClipboardEvent(msg);
+            // For the messages above the result is not used.
+            WXLRESULT result;
+            return MSWHandleMessage(&result, msg, wParam, lParam);
     }
 
     return false;