]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/choice.cpp
Should set event object to relevant window when dispatching wxEVT_HELP
[wxWidgets.git] / src / msw / choice.cpp
index d1fa5f71f4760a3bf1b46307c2edab5a14a1d607..6abcdaef9aa6822dfe8841f77ea869411f884a8f 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -179,8 +179,9 @@ bool wxChoice::MSWShouldPreProcessMessage(WXMSG *pMsg)
 {
     MSG *msg = (MSG *) pMsg;
 
-    // don't preprocess "ESC" if combobox is dropped down
-    if ( msg->message == WM_KEYDOWN && msg->wParam == VK_ESCAPE )
+    // if the dropdown list is visible, don't preprocess certain keys
+    if ( msg->message == WM_KEYDOWN
+        && (msg->wParam == VK_ESCAPE || msg->wParam == VK_RETURN) )
     {
         if (::SendMessage(GetHwndOf(this), CB_GETDROPPEDSTATE, 0, 0))
         {