]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/platform.h
remove unused wxMenuBar::m_style
[wxWidgets.git] / include / wx / platform.h
index 22b2469aafddbb70a492f8c80c92eebb52cd2f0e..35497c53edbb90a91da1b2137db7b59771a22661 100644 (file)
      */
 #    if defined(_MSC_VER) && !defined(__MWERKS__)
 #        define __VISUALC__ _MSC_VER
+
+    /*
+       define special symbols for different VC version instead of writing tests
+       for magic numbers such as 1200, 1300 &c repeatedly
+     */
+#   if __VISUALC__ < 1100
+#       error "This Visual C++ version is too old and not supported any longer."
+#   elif __VISUALC__ < 1200
+#       define __VISUALC5__
+#   elif __VISUALC__ < 1300
+#       define __VISUALC6__
+#   elif __VISUALC__ < 1400
+#       define __VISUALC7__
+#   elif __VISUALC__ < 1500
+#       define __VISUALC8__
+#   elif __VISUALC__ < 1600
+#       define __VISUALC9__
+#   else
+#       pragma message("Please update this code for the next VC++ version")
+#   endif
+
 #    elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
 #        define __BORLANDC__
 #    elif defined(__WATCOMC__)
 #define wxNEEDS_CHARPP
 #endif
 
+/*
+   This macro can be used to test the Visual C++ version.
+*/
+#ifndef __VISUALC__
+#   define wxVISUALC_VERSION(major) 0
+#   define wxCHECK_VISUALC_VERSION(major) 0
+#else
+#   define wxVISUALC_VERSION(major) ( (6 + major) * 100 )
+#   define wxCHECK_VISUALC_VERSION(major) ( __VISUALC__ >= wxVISUALC_VERSION(major) )
+#endif
+
 /*
    This macro can be used to check that the version of mingw32 compiler is
    at least maj.min
 # define wxVMS_USE_STD
 #endif
 
+#ifdef __VMS
+#define XtDisplay XTDISPLAY
+#ifdef __WXMOTIF__
+#define XtParent XTPARENT
+#define XtScreen XTSCREEN
+#define XtWindow XTWINDOW
+#endif
+#endif
+
 /* Choose which method we will use for updating menus
  * - in OnIdle, or when we receive a wxEVT_MENU_OPEN event.
  * Presently, only Windows and GTK+ support wxEVT_MENU_OPEN.