From 9a993e53d78605288d71f896a238b4d0b255945c Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Fri, 21 Apr 2000 15:09:51 +0000 Subject: [PATCH] Reverted recent WinMain changes due to incompatibility with the default WinMain declaration when windows.h was being included from other headers (compilers thought that we were trying to overload a C function and aborted compilation of the library) Current status is: For __WXMSW__ only, and only if WXUSINGDLL, this file #includes (and then "wx/msw/private.h") and declares WinMain correctly (matching the signature in ). This change does not affect non-DLL builds. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/app.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/include/wx/app.h b/include/wx/app.h index c6b1fe58f6..5538e053bd 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -380,13 +380,17 @@ public: #define WXAPIENTRY WXFAR wxSTDCALL #endif + #include + #include "wx/msw/winundef.h" + #define IMPLEMENT_WXWIN_MAIN \ - extern "C" int WXAPIENTRY WinMain(WXHINSTANCE hInstance,\ - WXHINSTANCE hPrevInstance,\ - char WXFAR *m_lpCmdLine,\ - int nCmdShow)\ + extern "C" int WXAPIENTRY WinMain(HINSTANCE hInstance,\ + HINSTANCE hPrevInstance,\ + LPSTR m_lpCmdLine, int nCmdShow)\ {\ - return wxEntry(hInstance, hPrevInstance, m_lpCmdLine, nCmdShow);\ + return wxEntry((WXHINSTANCE) hInstance,\ + (WXHINSTANCE) hPrevInstance,\ + m_lpCmdLine, nCmdShow);\ } #else #define IMPLEMENT_WXWIN_MAIN