#include "wx/msw/private/button.h"
#include "wx/msw/private/metrics.h"
#include "wx/msw/private/msgdlg.h"
+#include "wx/testing.h"
#if wxUSE_MSGBOX_HOOK
#include "wx/fontutil.h"
int wxMessageDialog::ShowModal()
{
+ WX_TESTING_SHOW_MODAL_HOOK();
+
#ifdef wxHAS_MSW_TASKDIALOG
if ( HasNativeTaskDialog() )
{
return ShowMessageBox();
}
+long wxMessageDialog::GetEffectiveIcon() const
+{
+ // only use the auth needed icon if available, otherwise fallback to the default logic
+ if ( (m_dialogStyle & wxICON_AUTH_NEEDED) &&
+ wxMSWMessageDialog::HasNativeTaskDialog() )
+ {
+ return wxICON_AUTH_NEEDED;
+ }
+
+ return wxMessageDialogBase::GetEffectiveIcon();
+}
+
void wxMessageDialog::DoCentre(int dir)
{
#ifdef wxHAS_MSW_TASKDIALOG
case wxICON_INFORMATION:
tdc.pszMainIcon = TD_INFORMATION_ICON;
break;
+
+ case wxICON_AUTH_NEEDED:
+ tdc.pszMainIcon = TD_SHIELD_ICON;
+ break;
}
// custom label button array that can hold all buttons in use