X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a4c649ea27c34f8613b3fc43106556bbe2ecd33..88f23fdd8366d57d15cba42d152539ff9ccbdd39:/src/msw/main.cpp diff --git a/src/msw/main.cpp b/src/msw/main.cpp index 13c6321b2b..5617b1f15c 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -28,7 +28,6 @@ #pragma hdrstop #endif -#include "wx/init.h" #include "wx/event.h" #include "wx/app.h" #include "wx/cmdline.h" @@ -69,13 +68,13 @@ static wxChar **ConvertToStandardCommandArgs(const wxChar *p, int& argc); // Windows-specific wxEntry // ---------------------------------------------------------------------------- -int wxEntry(WXHINSTANCE hInstance, - WXHINSTANCE WXUNUSED(hPrevInstance), - char *pCmdLine, - int nCmdShow) +WXDLLEXPORT int wxEntry(HINSTANCE hInstance, + HINSTANCE WXUNUSED(hPrevInstance), + char *pCmdLine, + int nCmdShow) { // remember the parameters Windows gave us - wxSetInstance((HINSTANCE)hInstance); + wxSetInstance(hInstance); wxApp::m_nCmdShow = nCmdShow; // parse the command line @@ -101,16 +100,23 @@ extern "C" #if !defined(_WINDLL) +#ifdef __WXWINCE__ +int WINAPI WinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPWSTR lpCmdLine, + int nCmdShow) +{ + return wxEntry(hInstance, hPrevInstance, (char*) lpCmdLine, nCmdShow); +} +#else int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { - return wxEntry((WXHINSTANCE) hInstance, - (WXHINSTANCE) hPrevInstance, - lpCmdLine, - nCmdShow); + return wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow); } +#endif #else // _WINDLL @@ -127,7 +133,7 @@ DllMain(HANDLE hModule, DWORD fdwReason, LPVOID WXUNUSED(lpReserved)) switch (fdwReason) { case DLL_PROCESS_ATTACH: - return wxEntry((WXHINSTANCE) hModule); + return wxEntry(hModule); case DLL_PROCESS_DETACH: wxEntryCleanup();