]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/main.cpp
fixed compilation when IDC_HAND is undefined
[wxWidgets.git] / src / msw / main.cpp
index 7ee7a28fe7ed7068d9de5379aef332fbea6949fd..75eb058746619503a5da48bcb90826f684605216 100644 (file)
@@ -70,7 +70,7 @@ extern int wxEntryReal(int& argc, wxChar **argv);
 
 #if wxUSE_BASE
 
-#if defined(__VISUALC__) && !defined(__WXWINCE__)
+#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
@@ -93,7 +93,7 @@ extern int wxEntryReal(int& argc, wxChar **argv);
 #endif // __VISUALC__/!__VISUALC__
 
 // ----------------------------------------------------------------------------
-// wrapper wxEntry catching all Win32 exceptions occuring in a wx program
+// wrapper wxEntry catching all Win32 exceptions occurring in a wx program
 // ----------------------------------------------------------------------------
 
 // wrap real wxEntry in a try-except block to be able to call
@@ -219,8 +219,11 @@ int wxEntry(int& argc, wxChar **argv)
     {
         wxFatalExit();
 
-        // this code is unreachable but put it here to suppress warnings
+#if !defined(_MSC_VER) || defined(__WXDEBUG__) || (defined(_MSC_VER) && _MSC_VER <= 1200)
+        // 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
     }
 }
 
@@ -315,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