diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index 384a50b9e0..a2bffb09ba 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -221,7 +221,7 @@ int wxDirDialog::ShowModal() { WX_HOOK_MODAL_DIALOG(); - wxWindow* const parent = GetParent(); + wxWindow* const parent = GetParentForModalDialog(); WXHWND hWndParent = parent ? GetHwndOf(parent) : NULL; // Use IFileDialog under new enough Windows, it's more user-friendly.