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 <windows.h> (and then "wx/msw/private.h") and declares WinMain correctly (matching the signature in <windows.h>). 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
This commit is contained in:
@@ -380,13 +380,17 @@ public:
|
||||
#define WXAPIENTRY WXFAR wxSTDCALL
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#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
|
||||
|
Reference in New Issue
Block a user