X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33349a2073d54c2c95146627fca01839956306ed..c01359d9d5a834a93c0b68425aa8fefdd88124ee:/src/msw/app.cpp?ds=inline diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 9a26a78043..e071002e1b 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: app.cpp +// Name: src/msw/app.cpp // Purpose: wxApp // Author: Julian Smart // Modified by: @@ -17,10 +17,6 @@ // headers // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "app.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -296,14 +292,20 @@ bool wxApp::Initialize(int& argc, wxChar **argv) } #endif -#if defined(__WIN95__) && !defined(__WXMICROWIN__) +#if !defined(__WXMICROWIN__) InitCommonControls(); -#endif // __WIN95__ +#endif // !defined(__WXMICROWIN__) #if defined(__SMARTPHONE__) || defined(__POCKETPC__) 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(); @@ -483,7 +485,7 @@ void wxApp::CleanUp() delete wxWinHandleHash; wxWinHandleHash = NULL; - + #ifdef __WXWINCE__ free( wxCanvasClassName ); free( wxCanvasClassNameNR ); @@ -501,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; } // ---------------------------------------------------------------------------- @@ -592,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); @@ -650,6 +642,7 @@ int wxApp::GetComCtl32Version() } } } +#endif } return s_verComCtl32; @@ -727,7 +720,7 @@ terminate the program,\r\n\ \"Retry\" to exit the program normally and \"Ignore\" to try to continue."), _T("Unhandled exception"), MB_ABORTRETRYIGNORE | - MB_ICONERROR| + MB_ICONERROR| MB_TASKMODAL ) ) @@ -777,4 +770,3 @@ bool wxApp::ProcessMessage(WXMSG* pMsg) } #endif // WXWIN_COMPATIBILITY_2_4 -