Correct compilation breakage of r63832.

wx/setup.h can't use wxCHECK_VISUALC_VERSION() which is defined in
wx/platform.h _after_ wx/setup.h inclusion.

Replace wxCHECK_VISUALC_VERSION() with manual tests for _MSC_VER.

Also add more comments to explain what's going on.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2010-04-03 12:25:52 +00:00
parent 22ed9d1186
commit 961f4d0ce6
9 changed files with 177 additions and 35 deletions

View File

@ -666,11 +666,27 @@
// mingw32) you may need to install the headers (and just the headers)
// yourself. If you do, change the setting below manually.
//
// Recommended setting: 1
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
#define wxUSE_GRAPHICS_CONTEXT 1
// Recommended setting: 1 if supported by the compilation environment
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
#ifdef _MSC_VER
# if _MSC_VER >= 1400
// MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
// support for it
# define wxUSE_GRAPHICS_CONTEXT 1
# else
// MSVC 6 didn't include GDI+ headers so disable by default, enable it
// here if you use MSVC 6 with a newer SDK
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
#define wxUSE_GRAPHICS_CONTEXT 0
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
# define wxUSE_GRAPHICS_CONTEXT 0
#endif
// ----------------------------------------------------------------------------

View File

@ -666,11 +666,27 @@
// mingw32) you may need to install the headers (and just the headers)
// yourself. If you do, change the setting below manually.
//
// Recommended setting: 1
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
#define wxUSE_GRAPHICS_CONTEXT 1
// Recommended setting: 1 if supported by the compilation environment
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
#ifdef _MSC_VER
# if _MSC_VER >= 1400
// MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
// support for it
# define wxUSE_GRAPHICS_CONTEXT 1
# else
// MSVC 6 didn't include GDI+ headers so disable by default, enable it
// here if you use MSVC 6 with a newer SDK
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
#define wxUSE_GRAPHICS_CONTEXT 0
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
# define wxUSE_GRAPHICS_CONTEXT 0
#endif
// ----------------------------------------------------------------------------

View File

@ -666,11 +666,27 @@
// mingw32) you may need to install the headers (and just the headers)
// yourself. If you do, change the setting below manually.
//
// Recommended setting: 1
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
#define wxUSE_GRAPHICS_CONTEXT 1
// Recommended setting: 1 if supported by the compilation environment
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
#ifdef _MSC_VER
# if _MSC_VER >= 1400
// MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
// support for it
# define wxUSE_GRAPHICS_CONTEXT 1
# else
// MSVC 6 didn't include GDI+ headers so disable by default, enable it
// here if you use MSVC 6 with a newer SDK
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
#define wxUSE_GRAPHICS_CONTEXT 0
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
# define wxUSE_GRAPHICS_CONTEXT 0
#endif
// ----------------------------------------------------------------------------

View File

@ -666,11 +666,27 @@
// mingw32) you may need to install the headers (and just the headers)
// yourself. If you do, change the setting below manually.
//
// Recommended setting: 1
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
#define wxUSE_GRAPHICS_CONTEXT 1
// Recommended setting: 1 if supported by the compilation environment
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
#ifdef _MSC_VER
# if _MSC_VER >= 1400
// MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
// support for it
# define wxUSE_GRAPHICS_CONTEXT 1
# else
// MSVC 6 didn't include GDI+ headers so disable by default, enable it
// here if you use MSVC 6 with a newer SDK
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
#define wxUSE_GRAPHICS_CONTEXT 0
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
# define wxUSE_GRAPHICS_CONTEXT 0
#endif
// ----------------------------------------------------------------------------

View File

@ -667,11 +667,27 @@
// mingw32) you may need to install the headers (and just the headers)
// yourself. If you do, change the setting below manually.
//
// Recommended setting: 1
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
#define wxUSE_GRAPHICS_CONTEXT 1
// Recommended setting: 1 if supported by the compilation environment
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
#ifdef _MSC_VER
# if _MSC_VER >= 1400
// MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
// support for it
# define wxUSE_GRAPHICS_CONTEXT 1
# else
// MSVC 6 didn't include GDI+ headers so disable by default, enable it
// here if you use MSVC 6 with a newer SDK
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
#define wxUSE_GRAPHICS_CONTEXT 0
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
# define wxUSE_GRAPHICS_CONTEXT 0
#endif
// ----------------------------------------------------------------------------

View File

@ -666,11 +666,27 @@
// mingw32) you may need to install the headers (and just the headers)
// yourself. If you do, change the setting below manually.
//
// Recommended setting: 1
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
#define wxUSE_GRAPHICS_CONTEXT 1
// Recommended setting: 1 if supported by the compilation environment
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
#ifdef _MSC_VER
# if _MSC_VER >= 1400
// MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
// support for it
# define wxUSE_GRAPHICS_CONTEXT 1
# else
// MSVC 6 didn't include GDI+ headers so disable by default, enable it
// here if you use MSVC 6 with a newer SDK
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
#define wxUSE_GRAPHICS_CONTEXT 0
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
# define wxUSE_GRAPHICS_CONTEXT 0
#endif
// ----------------------------------------------------------------------------

View File

@ -662,11 +662,27 @@
// mingw32) you may need to install the headers (and just the headers)
// yourself. If you do, change the setting below manually.
//
// Recommended setting: 1
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
#define wxUSE_GRAPHICS_CONTEXT 1
// Recommended setting: 1 if supported by the compilation environment
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
#ifdef _MSC_VER
# if _MSC_VER >= 1400
// MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
// support for it
# define wxUSE_GRAPHICS_CONTEXT 1
# else
// MSVC 6 didn't include GDI+ headers so disable by default, enable it
// here if you use MSVC 6 with a newer SDK
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
#define wxUSE_GRAPHICS_CONTEXT 0
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
# define wxUSE_GRAPHICS_CONTEXT 0
#endif
// ----------------------------------------------------------------------------

View File

@ -665,11 +665,27 @@
// mingw32) you may need to install the headers (and just the headers)
// yourself. If you do, change the setting below manually.
//
// Recommended setting: 1
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
#define wxUSE_GRAPHICS_CONTEXT 1
// Recommended setting: 1 if supported by the compilation environment
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
#ifdef _MSC_VER
# if _MSC_VER >= 1400
// MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
// support for it
# define wxUSE_GRAPHICS_CONTEXT 1
# else
// MSVC 6 didn't include GDI+ headers so disable by default, enable it
// here if you use MSVC 6 with a newer SDK
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
#define wxUSE_GRAPHICS_CONTEXT 0
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
# define wxUSE_GRAPHICS_CONTEXT 0
#endif
// ----------------------------------------------------------------------------

View File

@ -323,10 +323,24 @@
#define wxUSE_STC 0
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
#define wxUSE_GRAPHICS_CONTEXT 0
#ifdef _MSC_VER
# if _MSC_VER >= 1400
#define wxUSE_GRAPHICS_CONTEXT 0
# else
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
#define wxUSE_GRAPHICS_CONTEXT 0
# define wxUSE_GRAPHICS_CONTEXT 0
#endif