From: Vadim Zeitlin Date: Fri, 29 Jun 2012 23:55:54 +0000 (+0000) Subject: Fix generation of wxEVT_CHAR in wxMSW wxComboBox. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/38b1843b5cd8aad98dc91a45f93a4171c4ff37a2 Fix generation of wxEVT_CHAR in wxMSW wxComboBox. 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 --- diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index beb740ac71..03bda9b166 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -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;