diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 44b80d4354..f54a3164bf 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -333,6 +333,10 @@ bool wxDialog::Show(bool show) // this will cause IsModalShowing() return FALSE and our local // message loop will terminate wxModalDialogs.DeleteObject(this); + + // 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); } }