WinMain() is Unicode under CE (how did this work before?)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-04-04 12:54:20 +00:00
parent 7b162e540e
commit 7c8c7cc23e
2 changed files with 13 additions and 7 deletions

View File

@@ -627,20 +627,26 @@ public:
// we need HINSTANCE declaration to define WinMain() // we need HINSTANCE declaration to define WinMain()
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#ifdef SW_SHOWNORMAL #ifndef SW_SHOWNORMAL
#define wxSW_SHOWNORMAL SW_SHOWNORMAL #define SW_SHOWNORMAL 1
#endif
// WinMain() is always ANSI, even in Unicode build, under normal Windows
// but is always Unicode under CE
#ifdef __WXWINCE__
typedef wchar_t *wxCmdLineArgType;
#else #else
#define wxSW_SHOWNORMAL 0 typedef char *wxCmdLineArgType;
#endif #endif
#define IMPLEMENT_WXWIN_MAIN \ #define IMPLEMENT_WXWIN_MAIN \
extern int wxEntry(HINSTANCE hInstance, \ extern int wxEntry(HINSTANCE hInstance, \
HINSTANCE hPrevInstance = NULL, \ HINSTANCE hPrevInstance = NULL, \
char *pCmdLine = NULL, \ wxCmdLineArgType pCmdLine = NULL, \
int nCmdShow = wxSW_SHOWNORMAL); \ int nCmdShow = SW_SHOWNORMAL); \
extern "C" int WINAPI WinMain(HINSTANCE hInstance, \ extern "C" int WINAPI WinMain(HINSTANCE hInstance, \
HINSTANCE hPrevInstance, \ HINSTANCE hPrevInstance, \
char *lpCmdLine, \ wxCmdLineArgType lpCmdLine, \
int nCmdShow) \ int nCmdShow) \
{ \ { \
return wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow); \ return wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow); \

View File

@@ -61,7 +61,7 @@
WXDLLEXPORT int wxEntry(HINSTANCE hInstance, WXDLLEXPORT int wxEntry(HINSTANCE hInstance,
HINSTANCE WXUNUSED(hPrevInstance), HINSTANCE WXUNUSED(hPrevInstance),
char * WXUNUSED(pCmdLine), wxCmdLineArgType WXUNUSED(pCmdLine),
int nCmdShow) int nCmdShow)
{ {
// remember the parameters Windows gave us // remember the parameters Windows gave us