For DLL builds, the declaration of WinMain now takes fake
arguments (WXHINSTANCE, WXHINSTANCE, char*, int) in order to avoid the need of #including <windows.h> from app.h. Also, WinMain is now declared as extern "C". git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -380,35 +380,13 @@ public:
|
|||||||
#define WXAPIENTRY WXFAR wxSTDCALL
|
#define WXAPIENTRY WXFAR wxSTDCALL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Patch from Mumit Khan to allow DLL compilation under mingw. Note that
|
#define IMPLEMENT_WXWIN_MAIN \
|
||||||
// this includes <windows.h> which is a bad thing because it prevents
|
extern "C" int WXAPIENTRY WinMain(WXHINSTANCE hInstance,\
|
||||||
// wxWindows to work with MFC, so for now I'm making this change for
|
WXHINSTANCE hPrevInstance,\
|
||||||
// mingw/cygwin only (these don't work with MFC yet). GRG Mar/2000
|
char *m_lpCmdLine, int nCmdShow)\
|
||||||
#if defined(__GNUWIN32__)
|
{\
|
||||||
#include <windows.h>
|
return wxEntry(hInstance, hPrevInstance, m_lpCmdLine, nCmdShow);\
|
||||||
#include "wx/msw/winundef.h"
|
}
|
||||||
|
|
||||||
#define IMPLEMENT_WXWIN_MAIN \
|
|
||||||
extern "C" int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int);\
|
|
||||||
int WINAPI WinMain(HINSTANCE hInstance, \
|
|
||||||
HINSTANCE hPrevInstance,\
|
|
||||||
LPSTR m_lpCmdLine, int nCmdShow )\
|
|
||||||
{\
|
|
||||||
return wxEntry((WXHINSTANCE) hInstance, \
|
|
||||||
(WXHINSTANCE) hPrevInstance,\
|
|
||||||
m_lpCmdLine, nCmdShow);\
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#define IMPLEMENT_WXWIN_MAIN \
|
|
||||||
int WXAPIENTRY WinMain(HINSTANCE hInstance, \
|
|
||||||
HINSTANCE hPrevInstance,\
|
|
||||||
LPSTR m_lpCmdLine, int nCmdShow )\
|
|
||||||
{\
|
|
||||||
return wxEntry((WXHINSTANCE) hInstance, \
|
|
||||||
(WXHINSTANCE) hPrevInstance,\
|
|
||||||
m_lpCmdLine, nCmdShow);\
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#define IMPLEMENT_WXWIN_MAIN
|
#define IMPLEMENT_WXWIN_MAIN
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user