Files
wxWidgets/include/wx/msw/wrapwin.h
Vadim Zeitlin f4d4545873 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.
2018-06-12 19:52:26 +02:00

52 lines
1.4 KiB
C

/////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/wrapwin.h
// Purpose: Wrapper around <windows.h>, to be included instead of it
// Author: Vaclav Slavik
// Created: 2003/07/22
// Copyright: (c) 2003 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WRAPWIN_H_
#define _WX_WRAPWIN_H_
#include "wx/platform.h"
// before including windows.h, define version macros at (currently) maximal
// values because we do all our checks at run-time anyhow
#include "wx/msw/winver.h"
// strict type checking to detect conversion from HFOO to HBAR at compile-time
#ifndef STRICT
#define STRICT 1
#endif
// this macro tells windows.h to not define min() and max() as macros: we need
// this as otherwise they conflict with standard C++ functions
#ifndef NOMINMAX
#define NOMINMAX
#endif // NOMINMAX
// For IPv6 support, we must include winsock2.h before winsock.h, and
// windows.h include winsock.h so do it before including it
#if wxUSE_IPV6
#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"
#endif // _WX_WRAPWIN_H_