X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0aadc6f40301f99cbdcc345807b808737a492bf..da78f3b10cfe9447053f32ea4baddf50058eafef:/src/msw/main.cpp?ds=sidebyside diff --git a/src/msw/main.cpp b/src/msw/main.cpp index 15741e3ed7..05b74c9e0a 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -70,7 +70,7 @@ extern int wxEntryReal(int& argc, wxChar **argv); #if wxUSE_BASE -#ifdef __VISUALC__ +#if wxUSE_ON_FATAL_EXCEPTION && defined(__VISUALC__) && !defined(__WXWINCE__) // VC++ (at least from 4.0 up to version 7.1) is incredibly broken in that // a "catch ( ... )" will *always* catch SEH exceptions in it even though // it should have never been the case... to prevent such catches from @@ -219,14 +219,17 @@ int wxEntry(int& argc, wxChar **argv) { wxFatalExit(); - // this code is unreachable but put it here to suppress warnings +#if !defined(__VISUALC__) || defined(__WXDEBUG__) + // this code is unreachable but put it here to suppress warnings in some compilers + // and disable for others to supress warnings too return -1; +#endif // !__VISUALC__ in release build } } #else // !wxUSE_ON_FATAL_EXCEPTION -#ifdef __VISUALC__ +#if defined(__VISUALC__) && !defined(__WXWINCE__) static void wxSETranslator(unsigned int WXUNUSED(code), EXCEPTION_POINTERS * WXUNUSED(ep)) @@ -239,9 +242,7 @@ wxSETranslator(unsigned int WXUNUSED(code), EXCEPTION_POINTERS * WXUNUSED(ep)) int wxEntry(int& argc, wxChar **argv) { -#ifndef __WXWINCE__ DisableAutomaticSETranslator(); -#endif return wxEntryReal(argc, argv); } @@ -317,7 +318,7 @@ extern "C" // DLL entry point BOOL WINAPI -DllMain(HANDLE hModule, DWORD fdwReason, LPVOID WXUNUSED(lpReserved)) +DllMain(HINSTANCE hModule, DWORD fdwReason, LPVOID WXUNUSED(lpReserved)) { // Only call wxEntry if the application itself is part of the DLL. // If only the wxWidgets library is in the DLL, then the