Don't try to center task dialogs under Windows.
This is either unnecessary or doesn't work anyhow (they are always centered on the parent window) and just results in debug error messages. Simply don't do anything in wxMessageDialog::Centre() when using task dialog implementation under MSW. Closes #12699. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
|
||||
return wxMessageDialogBase::DoCentre(dir);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Helpers of the wxMSWMessageDialog namespace
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user