From 995a594ab4c6a9a275ba8094f1f5c7c77f0cf926 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 16 Dec 1999 20:49:07 +0000 Subject: [PATCH] Killed a bug that sometimes prevented ShowModal from returning if the ESC key was used. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 531a3fc9c8..2820cfaa33 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -213,6 +213,9 @@ void wxDialog::OnCharHook(wxKeyEvent& event) 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; } } -- 2.45.2