X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..342751763793b5cdad252d731aac0618d0674e5b:/src/msw/dialog.cpp 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; } }