]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialog.cpp
Initial revision
[wxWidgets.git] / src / msw / dialog.cpp
index 0ded488a510711f199ee29a208518f58901dae34..2820cfaa33130eba61f7024af4c166fe46c7229a 100644 (file)
@@ -46,7 +46,6 @@ wxWindowList wxModalDialogs;
 wxWindowList wxModelessWindows;  // Frames and modeless dialogs
 extern wxList WXDLLEXPORT wxPendingDelete;
 
-#if !USE_SHARED_LIBRARY
     IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxPanel)
 
     BEGIN_EVENT_TABLE(wxDialog, wxPanel)
@@ -58,7 +57,6 @@ extern wxList WXDLLEXPORT wxPendingDelete;
         EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
         EVT_CLOSE(wxDialog::OnCloseWindow)
     END_EVENT_TABLE()
-#endif
 
 wxDialog::wxDialog()
 {
@@ -215,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;
     }
   }