X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b1985a920a3e3fb457192d4bee7ea89a72a974a..66f75561893ea7b4bf429d1882d9cc0407ba932d:/src/msw/msgdlg.cpp?ds=sidebyside diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp index f6057f7361..9b8440932a 100644 --- a/src/msw/msgdlg.cpp +++ b/src/msw/msgdlg.cpp @@ -600,6 +600,19 @@ int wxMessageDialog::ShowModal() return ShowMessageBox(); } +void wxMessageDialog::DoCentre(int dir) +{ +#ifdef wxHAS_MSW_TASKDIALOG + // Task dialog is always centered on its parent window and trying to center + // it manually doesn't work because its HWND is not created yet so don't + // even try as this would only result in (debug) error messages. + if ( HasNativeTaskDialog() ) + return; +#endif // wxHAS_MSW_TASKDIALOG + + wxMessageDialogBase::DoCentre(dir); +} + // ---------------------------------------------------------------------------- // Helpers of the wxMSWMessageDialog namespace // ----------------------------------------------------------------------------