This is okay for C::B build of WxWidgets, BUT what about other MS Windows compilers like Visual Studio (using the MS compiler)?
It may be better to do the following:
#if defined(_MSC_VER) && _MSC_VER >= 1600
#define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
#else
#if defined(__GNUC__)
#define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
#else
#define wxUSE_GRAPHICS_DIRECT2D 0
#endif
#endif
This way if someone was to use :
1. GNU compiler it will use wxUSE_GRAPHICS_CONTEXT.
2. Visual Studio < 1600 then it will use 0.
It's not always intuitive the best way of supporting multiple different compiler manufacturers and versions in a header file sometimes.
It can get way more complex when you throw in
* 32 V 64 bit
and/or
* GNU V's CYGWIN V's MSVC
and/or
Windows V's Linux and still use the GNU compiler......
and then inn the code
having to support %I64u or %lu etc etc etc
getting these combinations has sometimes caused me to waste a few hours.