X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/beed393c6772484210de27ecd3c8f6fb85675c36..7eb833e673676abd1cbf02dee9eb937d3166a19a:/src/msw/main.cpp diff --git a/src/msw/main.cpp b/src/msw/main.cpp index 237eb9eee3..9c99ed611c 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -33,6 +33,12 @@ #include "wx/msw/private.h" +// Don't implement WinMain if we're building an MFC/wxWindows +// hybrid app. +#if wxUSE_MFC && !defined(NOMAIN) +#define NOMAIN 1 +#endif + // from src/msw/app.cpp extern void WXDLLEXPORT wxEntryCleanup(); @@ -66,11 +72,11 @@ HINSTANCE wxhInstance = 0; #if !defined(_WINDLL) -#if defined(__TWIN32__) || defined(__WXWINE__) +#if defined(__TWIN32__) || defined(__WXMICROWIN__) #define HINSTANCE HANDLE extern "C" -#endif // WINE +#endif int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, @@ -114,8 +120,11 @@ BOOL WINAPI DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved) wxEntryCleanup(); break; } +#else + (void)hModule; + (void)fdwReason; #endif // !WXMAKINGDLL - + (void)lpReserved; return TRUE; }