]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/choice.cpp
allow a - at the beginning of a menu item (would become a separator by default)
[wxWidgets.git] / src / msw / choice.cpp
index af029bf042dbdf1cc587f20673fa933ce80f810d..6abcdaef9aa6822dfe8841f77ea869411f884a8f 100644 (file)
@@ -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))
         {