]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialog.cpp
more backwards compatible kbd handling in wxScrolledWindow
[wxWidgets.git] / src / msw / dialog.cpp
index 531a3fc9c886e466d1e586e18b4807b606c4a71a..2820cfaa33130eba61f7024af4c166fe46c7229a 100644 (file)
@@ -213,6 +213,9 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
         cancelEvent.SetEventObject( this );
         GetEventHandler()->ProcessEvent(cancelEvent);
 
         cancelEvent.SetEventObject( this );
         GetEventHandler()->ProcessEvent(cancelEvent);
 
+        // ensure that there is another message for this window so the
+        // ShowModal loop will exit and won't get stuck in GetMessage().
+        ::PostMessage(GetHwnd(), WM_NULL, 0, 0);
         return;
     }
   }
         return;
     }
   }