Explicitly disable all warnings from windows.h for MSVC

While Windows headers compile without warnings at maximal warning level,
they still contain some warnings which are disabled by default, but can
be enabled explicitly, such as C4668.

Make life simpler for the user code doing this by avoiding giving these
warnings from the Platform SDK headers as it doesn't cost much to do
this from wxMSW itself, while doing it from the user code is nontrivial.
This commit is contained in:
Vadim Zeitlin 2018-06-12 19:52:26 +02:00
parent 71bb680a93
commit f4d4545873

View File

@ -34,8 +34,17 @@
#include <winsock2.h>
#endif
// Disable any warnings inside Windows headers.
#ifdef __VISUALC__
#pragma warning(push, 1)
#endif
#include <windows.h>
#ifdef __VISUALC__
#pragma warning(pop)
#endif
// #undef the macros defined in winsows.h which conflict with code elsewhere
#include "wx/msw/winundef.h"