Extract setting WINVER/_WIN32_WINNT to a separate file
This will allow reusing it from other places.
This commit is contained in:
@@ -743,6 +743,7 @@ ALL_PORTS_BASE_HEADERS = \
|
|||||||
wx/msw/stackwalk.h \
|
wx/msw/stackwalk.h \
|
||||||
wx/msw/stdpaths.h \
|
wx/msw/stdpaths.h \
|
||||||
wx/msw/winundef.h \
|
wx/msw/winundef.h \
|
||||||
|
wx/msw/winver.h \
|
||||||
wx/msw/wrapcctl.h \
|
wx/msw/wrapcctl.h \
|
||||||
wx/msw/wrapcdlg.h \
|
wx/msw/wrapcdlg.h \
|
||||||
wx/msw/wrapwin.h \
|
wx/msw/wrapwin.h \
|
||||||
@@ -2581,6 +2582,7 @@ COND_PLATFORM_WIN32_1_BASE_PLATFORM_HDR = \
|
|||||||
wx/msw/stackwalk.h \
|
wx/msw/stackwalk.h \
|
||||||
wx/msw/stdpaths.h \
|
wx/msw/stdpaths.h \
|
||||||
wx/msw/winundef.h \
|
wx/msw/winundef.h \
|
||||||
|
wx/msw/winver.h \
|
||||||
wx/msw/wrapcctl.h \
|
wx/msw/wrapcctl.h \
|
||||||
wx/msw/wrapcdlg.h \
|
wx/msw/wrapcdlg.h \
|
||||||
wx/msw/wrapwin.h \
|
wx/msw/wrapwin.h \
|
||||||
|
@@ -169,6 +169,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
wx/msw/stackwalk.h
|
wx/msw/stackwalk.h
|
||||||
wx/msw/stdpaths.h
|
wx/msw/stdpaths.h
|
||||||
wx/msw/winundef.h
|
wx/msw/winundef.h
|
||||||
|
wx/msw/winver.h
|
||||||
wx/msw/wrapcctl.h
|
wx/msw/wrapcctl.h
|
||||||
wx/msw/wrapcdlg.h
|
wx/msw/wrapcdlg.h
|
||||||
wx/msw/wrapwin.h
|
wx/msw/wrapwin.h
|
||||||
|
@@ -124,6 +124,7 @@ BASE_WIN32_HDR =
|
|||||||
wx/msw/stackwalk.h
|
wx/msw/stackwalk.h
|
||||||
wx/msw/stdpaths.h
|
wx/msw/stdpaths.h
|
||||||
wx/msw/winundef.h
|
wx/msw/winundef.h
|
||||||
|
wx/msw/winver.h
|
||||||
wx/msw/wrapcctl.h
|
wx/msw/wrapcctl.h
|
||||||
wx/msw/wrapcdlg.h
|
wx/msw/wrapcdlg.h
|
||||||
wx/msw/wrapwin.h
|
wx/msw/wrapwin.h
|
||||||
|
36
include/wx/msw/winver.h
Normal file
36
include/wx/msw/winver.h
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: wx/msw/winver.h
|
||||||
|
// Purpose: Define Windows version macros if they're not predefined.
|
||||||
|
// Author: Vadim Zeitlin
|
||||||
|
// Created: 2017-01-13 (extracted from wx/msw/wrapwin.h)
|
||||||
|
// Copyright: (c) 2017 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef _WX_MSW_WINVER_H_
|
||||||
|
#define _WX_MSW_WINVER_H_
|
||||||
|
|
||||||
|
// Notice that this header must not include any other wx headers as it's
|
||||||
|
// indirectly included from wx/defs.h itself when using gcc (via wx/platform.h,
|
||||||
|
// then wx/compiler.h and wx/msw/gccpriv.h).
|
||||||
|
|
||||||
|
// Define WINVER, _WIN32_WINNT and _WIN32_IE to the highest possible values
|
||||||
|
// because we always check for the version of installed DLLs at runtime anyway
|
||||||
|
// (see wxGetWinVersion() and wxApp::GetComCtl32Version()) unless the user
|
||||||
|
// really doesn't want to use APIs only available on later OS versions and had
|
||||||
|
// defined them to (presumably lower) values -- or, alternatively, wants to use
|
||||||
|
// even higher version of the API which will become available later.
|
||||||
|
|
||||||
|
#ifndef WINVER
|
||||||
|
#define WINVER 0x0603
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WIN32_WINNT
|
||||||
|
#define _WIN32_WINNT 0x0603
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WIN32_IE
|
||||||
|
#define _WIN32_IE 0x0700
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // _WX_MSW_WINVER_H_
|
@@ -12,6 +12,10 @@
|
|||||||
|
|
||||||
#include "wx/platform.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
|
// strict type checking to detect conversion from HFOO to HBAR at compile-time
|
||||||
#ifndef STRICT
|
#ifndef STRICT
|
||||||
#define STRICT 1
|
#define STRICT 1
|
||||||
@@ -24,25 +28,6 @@
|
|||||||
#endif // NOMINMAX
|
#endif // NOMINMAX
|
||||||
|
|
||||||
|
|
||||||
// before including windows.h, define version macros at (currently) maximal
|
|
||||||
// values because we do all our checks at run-time anyhow
|
|
||||||
#ifndef WINVER
|
|
||||||
#define WINVER 0x0603
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// define _WIN32_WINNT and _WIN32_IE to the highest possible values because we
|
|
||||||
// always check for the version of installed DLLs at runtime anyway (see
|
|
||||||
// wxGetWinVersion() and wxApp::GetComCtl32Version()) unless the user really
|
|
||||||
// doesn't want to use APIs only available on later OS versions and had defined
|
|
||||||
// them to (presumably lower) values
|
|
||||||
#ifndef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0603
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WIN32_IE
|
|
||||||
#define _WIN32_IE 0x0700
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For IPv6 support, we must include winsock2.h before winsock.h, and
|
// For IPv6 support, we must include winsock2.h before winsock.h, and
|
||||||
// windows.h include winsock.h so do it before including it
|
// windows.h include winsock.h so do it before including it
|
||||||
#if wxUSE_IPV6
|
#if wxUSE_IPV6
|
||||||
|
Reference in New Issue
Block a user