X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..a7ac4461ab64212a536a8dabffc2ad65ef573a5f:/src/msw/dummy.cpp diff --git a/src/msw/dummy.cpp b/src/msw/dummy.cpp index 67004e57c8..dda57b7e3b 100644 --- a/src/msw/dummy.cpp +++ b/src/msw/dummy.cpp @@ -1,14 +1,12 @@ /* - * File: dummy.cc - * Purpose: See below - * Author: Julian Smart - * Created: 1993 - * Updated: + * File: dummy.cc + * Purpose: See below + * Author: Julian Smart + * Created: 1993 + * Updated: * Copyright: (c) 1993, AIAI, University of Edinburgh */ -/* static const char sccsid[] = "@(#)dummy.cc 1.2 5/9/94"; */ - /* A dummy file to include wx.h. If precompiling wx.h, I * always start by compiling this and producing the PCH file. * Then subsequent source files use the PCH file. @@ -22,8 +20,6 @@ * This will produce a big PCH file. */ - - #if defined(__BORLANDC__) #if !(defined(__WIN32__) || defined(__NT__) || defined(__WIN32__)) #pragma hdrfile "c:\wx\src\msw\wx.pch" @@ -33,32 +29,49 @@ #endif #include "wx/wxprec.h" -#include "windows.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif -// Foils optimizations in Visual C++ (see also wx_main.cc) -char wxDummyChar=0; +#include + +#include "wx/msw/msvcrt.h" + +// Foils optimizations in Visual C++ (see also app.cpp). Without it, +// dummy.obj isn't linked and we get a linker error. +#if defined(__VISUALC__) + char wxDummyChar = 0; +#endif -#if defined(WXUSINGDLL) +// if wxWindows is in the DLL link our entry point with the application +// N.B. see include/wx/app.h, we're now putting this in IMPLEMENT_APP so we +// don't have to link our apps with dummy.obj. + +#if 0 // defined(WXUSINGDLL) // NT defines APIENTRY, 3.x not #if !defined(APIENTRY) -#define APIENTRY FAR PASCAL + #define APIENTRY FAR PASCAL #endif - + +int #ifdef __WATCOMC__ -int PASCAL + PASCAL #else -int APIENTRY + APIENTRY #endif - - WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR m_lpCmdLine, - int nCmdShow ) +WinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPSTR m_lpCmdLine, + int nCmdShow ) { - return wxEntry((WXHINSTANCE) hInstance, (WXHINSTANCE) hPrevInstance, m_lpCmdLine, nCmdShow); +#if !WXUSINGDLL + wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +#endif + + return wxEntry((WXHINSTANCE) hInstance, (WXHINSTANCE) hPrevInstance, + m_lpCmdLine, nCmdShow); } #endif