Call SetErrorMode() for all Windows applications, not just wxMSW ones.

This suppresses default system error message boxes when trying to load an
invalid DLL in wxGTK/Windows.

Closes #15559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2013-10-09 10:34:19 +00:00
parent fda2a17812
commit 0180c58801
2 changed files with 4 additions and 6 deletions

View File

@ -173,6 +173,10 @@ wxAppConsoleBase::~wxAppConsoleBase()
bool wxAppConsoleBase::Initialize(int& WXUNUSED(argc), wxChar **WXUNUSED(argv))
{
#if defined(__WINDOWS__) && !defined(__WXWINCE__)
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
#endif
return true;
}

View File

@ -646,12 +646,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
SHInitExtraControls();
#endif
#ifndef __WXWINCE__
// Don't show a message box if a function such as SHGetFileInfo
// fails to find a device.
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
#endif
wxOleInitialize();
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)