diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp index fe30065f33..882416ddba 100644 --- a/src/msw/colordlg.cpp +++ b/src/msw/colordlg.cpp @@ -177,6 +177,8 @@ int wxColourDialog::ShowModal() { WX_HOOK_MODAL_DIALOG(); + wxWindowDisabler disableOthers(this); + wxWindow* const parent = GetParentForModalDialog(m_parent, GetWindowStyle()); WXHWND hWndParent = parent ? GetHwndOf(parent) : NULL; diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index 44431a43dd..c520ccbd4d 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -152,6 +152,8 @@ int wxDirDialog::ShowModal() { WX_HOOK_MODAL_DIALOG(); + wxWindowDisabler disableOthers(this); + wxWindow* const parent = GetParentForModalDialog(); WXHWND hWndParent = parent ? GetHwndOf(parent) : NULL; diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index c112a8656a..148b00e916 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -430,6 +430,8 @@ int wxFileDialog::ShowModal() { WX_HOOK_MODAL_DIALOG(); + wxWindowDisabler disableOthers(this); + wxWindow* const parent = GetParentForModalDialog(m_parent, GetWindowStyle()); WXHWND hWndParent = parent ? GetHwndOf(parent) : NULL; diff --git a/src/msw/fontdlg.cpp b/src/msw/fontdlg.cpp index b8d8b11340..fa9d2e3641 100644 --- a/src/msw/fontdlg.cpp +++ b/src/msw/fontdlg.cpp @@ -92,6 +92,8 @@ int wxFontDialog::ShowModal() { WX_HOOK_MODAL_DIALOG(); + wxWindowDisabler disableOthers(this); + wxWindow* const parent = GetParentForModalDialog(m_parent, GetWindowStyle()); WXHWND hWndParent = parent ? GetHwndOf(parent) : NULL; // It should be OK to always use GDI simulations diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp index 36c543f27e..a6f40a1324 100644 --- a/src/msw/msgdlg.cpp +++ b/src/msw/msgdlg.cpp @@ -539,6 +539,8 @@ int wxMessageDialog::ShowModal() { WX_HOOK_MODAL_DIALOG(); + wxWindowDisabler disableOthers(this); + #ifdef wxHAS_MSW_TASKDIALOG if ( HasNativeTaskDialog() ) { diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index 4cf8bdebed..ac3a54097e 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -29,6 +29,7 @@ #include "wx/app.h" #include "wx/dcprint.h" #include "wx/cmndata.h" + #include "wx/utils.h" // for wxWindowDisabler #endif #include "wx/printdlg.h" @@ -805,6 +806,8 @@ int wxWindowsPrintDialog::ShowModal() { WX_HOOK_MODAL_DIALOG(); + wxWindowDisabler disableOthers(this); + wxWindow* const parent = GetParentForModalDialog(m_parent, GetWindowStyle()); WXHWND hWndParent = parent ? GetHwndOf(parent) : NULL; diff --git a/src/msw/richmsgdlg.cpp b/src/msw/richmsgdlg.cpp index e2e60f7b72..488505e4ce 100644 --- a/src/msw/richmsgdlg.cpp +++ b/src/msw/richmsgdlg.cpp @@ -17,6 +17,7 @@ #ifndef WX_PRECOMP #include "wx/msw/private.h" + #include "wx/utils.h" // for wxWindowDisabler #endif // This will define wxHAS_MSW_TASKDIALOG if we have support for it in the @@ -36,6 +37,8 @@ int wxRichMessageDialog::ShowModal() if ( HasNativeTaskDialog() ) { + wxWindowDisabler disableOthers(this); + // create a task dialog WinStruct tdc; wxMSWTaskDialogConfig wxTdc(*this);