X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a71d815bbe669ebb9bdb9409926a272c37a5a9aa..b1c6a00e631be013b9dc3eb43959c80369a99e56:/src/msw/app.cpp diff --git a/src/msw/app.cpp b/src/msw/app.cpp index c56de63bc9..e071002e1b 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -300,6 +300,12 @@ 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(); RegisterWindowClasses(); @@ -497,17 +503,6 @@ wxApp::wxApp() wxApp::~wxApp() { - // our cmd line arguments are allocated inside wxEntry(HINSTANCE), they - // don't come from main(), so we have to free them - - while ( argc ) - { - // m_argv elements were allocated by wxStrdup() - free(argv[--argc]); - } - - // but m_argv itself -- using new[] - delete [] argv; } // ---------------------------------------------------------------------------- @@ -588,7 +583,8 @@ int wxApp::GetComCtl32Version() // we're prepared to handle the errors wxLogNull noLog; - + +#if wxUSE_DYNLIB_CLASS // do we have it? wxDynamicLibrary dllComCtl32(_T("comctl32.dll"), wxDL_VERBATIM); @@ -646,6 +642,7 @@ int wxApp::GetComCtl32Version() } } } +#endif } return s_verComCtl32;