From: Vadim Zeitlin Date: Wed, 12 Jan 2011 13:39:24 +0000 (+0000) Subject: Disable deprecation and other warnings in MFC sample. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ed2da291ad485031cf6fd23d3a61a35560e37dd6?ds=inline Disable deprecation and other warnings in MFC sample. VC8+ give tons of deprecation warnings for the standard functions which are usually suppressed by wx headers but they need to be included first for the suppression to be effective. In the MFC sample they were not resulting in many useless warnings. Fix this by pre-defining _CRT_SECURE_NO_WARNINGS to suppress them in the sample itself. Also suppress a warning about WINVER being undefined. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/mfc/mfctest.cpp b/samples/mfc/mfctest.cpp index a67b88d026..31a7ded470 100644 --- a/samples/mfc/mfctest.cpp +++ b/samples/mfc/mfctest.cpp @@ -50,6 +50,18 @@ // - [version] -> 42 or 70 or 80 etc // - u if using Unicode +// Disable deprecation warnings from headers included from stdafx.h for VC8+ +#ifndef _CRT_SECURE_NO_WARNINGS + #define _CRT_SECURE_NO_WARNINGS +#endif + +// Also define WINVER to avoid warnings about it being undefined from the +// platform SDK headers (usually this is not necessary because it is done by wx +// headers but here we include the system ones before them) +#ifndef WINVER + #define WINVER 0x0600 +#endif + #include "stdafx.h" // For compilers that support precompilation, includes "wx/wx.h".