]> git.saurik.com Git - wxWidgets.git/commitdiff
Disable deprecation and other warnings in MFC sample.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 12 Jan 2011 13:39:24 +0000 (13:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 12 Jan 2011 13:39:24 +0000 (13:39 +0000)
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

samples/mfc/mfctest.cpp

index a67b88d026479ce8addc4f638ac9eb250608ca6b..31a7ded470045ef977833a993c2798ca42de2ec5 100644 (file)
 //     -  [version] -> 42 or 70 or 80 etc
 //     -  u if using Unicode
 
 //     -  [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".
 #include "stdafx.h"
 
 // For compilers that support precompilation, includes "wx/wx.h".