]> git.saurik.com Git - wxWidgets.git/commitdiff
added <windows.h> wrapper
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 15 Jul 2003 18:52:32 +0000 (18:52 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 15 Jul 2003 18:52:32 +0000 (18:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

31 files changed:
configure
configure.in
include/wx/msw/private.h
include/wx/msw/wrapwin.h [new file with mode: 0644]
include/wx/wxprec.h
src/common/file.cpp
src/common/filefn.cpp
src/common/filename.cpp
src/common/gdicmn.cpp
src/common/imagbmp.cpp
src/common/imagjpeg.cpp
src/common/memory.cpp
src/common/paper.cpp
src/common/quantize.cpp
src/common/stopwatch.cpp
src/msw/checklst.cpp
src/msw/clipbrd.cpp
src/msw/colordlg.cpp
src/msw/colour.cpp
src/msw/crashrpt.cpp
src/msw/dde.cpp
src/msw/iniconf.cpp
src/msw/ole/access.cpp
src/msw/ole/droptgt.cpp
src/msw/ole/uuid.cpp
src/msw/registry.cpp
src/msw/uxtheme.cpp
src/msw/wave.cpp
src/msw/wince/net.cpp
src/msw/wince/time.cpp
src/msw/window.cpp

index d842c6b98919d3a7722512d3adb11fac7c976e1f..f488006aa4bf31f2338415380fdef20bd231f174 100755 (executable)
--- a/configure
+++ b/configure
@@ -6494,22 +6494,15 @@ fi
 ## FIXME: This is a blatant hack
 if test "x$wxUSE_COCOA" != "x" -a "$wxUSE_COCOA" != "0" ; then
   wxUSE_PRINTING_ARCHITECTURE=no
-  wxUSE_HELP=no
   wxUSE_CLIPBOARD=no
   wxUSE_DRAG_AND_DROP=no
   wxUSE_DATAOBJ=no
   # Generic notebook requires tab dialog
   DEFAULT_wxUSE_TABDIALOG=yes
   DEFAULT_wxUSE_TOOLBAR_NATIVE=no
-  DEFAULT_wxUSE_GAUGE=no
   DEFAULT_wxUSE_SCROLLBAR=no
-  DEFAULT_wxUSE_COMBOBOX=no
-  DEFAULT_wxUSE_CALCTRL=no
-  DEFAULT_wxUSE_SPINBTN=no
-  DEFAULT_wxUSE_SPINCTRL=no
   DEFAULT_wxUSE_TOOLTIPS=no
   DEFAULT_wxUSE_DRAGIMAGE=no
-  DEFAULT_wxUSE_PROGRESSDLG=no
 fi
 
 
 
 
 
-        echo "$as_me:$LINENO: checking if w32api has good enough MSIE support" >&5
-echo $ECHO_N "checking if w32api has good enough MSIE support... $ECHO_C" >&6
-if test "${wx_cv_w32api_win32_ie+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-      cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <w32api.h>
-int
-main ()
-{
-
-                       #define wxCHECK_W32API_VERSION( major, minor ) \
-                       ( defined( __W32API_MAJOR_VERSION ) && defined( __W32API_MINOR_VERSION ) \
-                       && ( ( __W32API_MAJOR_VERSION > (major) ) \
-                       || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor))))
-
-                       #if !wxCHECK_W32API_VERSION(1,1)
-                       #error You need w32api 1.1 or newer
-                       #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-                        wx_cv_w32api_win32_ie=yes
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                        wx_cv_w32api_win32_ie=no
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $wx_cv_w32api_win32_ie" >&5
-echo "${ECHO_T}$wx_cv_w32api_win32_ie" >&6
-    if test "$wx_cv_w32api_win32_ie" = "yes" ; then
-        CPPFLAGS="$CPPFLAGS -D_WIN32_IE=0x400"
-    fi
-
             LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32"
 
     if test "$wxUSE_ACCESSIBILITY" = "yes" ; then
index 2522347fd95ca0f9c663e0a19f6dcca7ae31a0f3..59ca6bd8d7491cac9c16009b2eb2c18abaa61502 100644 (file)
@@ -2059,29 +2059,6 @@ if test "$USE_WIN32" = 1 ; then
         AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
     ])
 
-    dnl check if can use _WIN32_IE macro
-    AC_CACHE_CHECK([if w32api has good enough MSIE support], wx_cv_w32api_win32_ie,
-    [
-      AC_TRY_COMPILE([#include <w32api.h>],
-                     [
-                       #define wxCHECK_W32API_VERSION( major, minor ) \
-                       ( defined( __W32API_MAJOR_VERSION ) && defined( __W32API_MINOR_VERSION ) \
-                       && ( ( __W32API_MAJOR_VERSION > (major) ) \
-                       || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor))))
-
-                       #if !wxCHECK_W32API_VERSION(1,1)
-                       #error You need w32api 1.1 or newer
-                       #endif
-                     ], [
-                        wx_cv_w32api_win32_ie=yes
-                     ], [
-                        wx_cv_w32api_win32_ie=no
-                     ])
-    ])
-    if test "$wx_cv_w32api_win32_ie" = "yes" ; then
-        CPPFLAGS="$CPPFLAGS -D_WIN32_IE=0x400"
-    fi
-
     dnl --- FIXME: This is still a somewhat random list of libs,
     dnl ---        some of them should probably be included conditionally.
     LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32"
index 3e5465eec32254df85bd303d0ed0fd30ad59384c..28838451e1d306d0e4035426df5b8604f824aa8b 100644 (file)
 #ifndef _WX_PRIVATE_H_
 #define _WX_PRIVATE_H_
 
-#ifndef STRICT
-    #define STRICT 1
-#endif
-
-#include <windows.h>
+#include "wx/msw/wrapwin.h"
 
 
 #if defined (__WXWINCE__)
@@ -32,9 +28,6 @@
     #include "wx/msw/microwin.h"
 #endif
 
-// undefine conflicting symbols which were defined in windows.h
-#include "wx/msw/winundef.h"
-
 // Include fixes for MSLU:
 #include "wx/msw/mslu.h"
 
diff --git a/include/wx/msw/wrapwin.h b/include/wx/msw/wrapwin.h
new file mode 100644 (file)
index 0000000..84141ec
--- /dev/null
@@ -0,0 +1,37 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wrapwin.h
+// Purpose:     Wrapper around <windows.h>, to be included instead of it
+// Created:     2003/07/22
+// RCS-ID:      $Id$
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_WRAPWIN_H_
+#define _WX_WRAPWIN_H_
+
+#include "wx/platform.h"
+
+#ifndef STRICT
+    #define STRICT 1
+#endif
+
+// define _WIN32_IE to a high value because we always check for the version
+// of installed DLLs at runtime anyway:
+#ifndef _WIN32_IE
+    // for compilers that use w32api headers: w32api must be >= 1.1:
+    #if defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \
+        defined( __CYGWIN__ ) || \
+        (defined(__WATCOMC__) && __WATCOMC__ >= 1200) || \
+        defined(__DIGITALMARS__)
+        #if wxCHECK_W32API_VERSION(1,1)
+            #define _WIN32_IE 0x400
+        #endif
+    #else
+        #define _WIN32_IE 0x400
+    #endif
+#endif
+
+#include <windows.h>
+#include "wx/msw/winundef.h"
+
+#endif
index 76f16b4108be49afcb6adcb687a0bd80cee92098..fc6bba536cb5f01800fb4b10a858bf0568d8cd37 100644 (file)
@@ -38,8 +38,7 @@
         #define STRICT 1
     #endif
 
-    #include <windows.h>
-    #include "wx/msw/winundef.h"
+    #include "wx/msw/wrapwin.h"
 #endif
 
 // include the most common wx headers
index 637d450da530548d19e9e4f8c4b5f36cae642e59..da27b425d1cb317f27864d880125c228bfa6ea33 100644 (file)
@@ -60,7 +60,7 @@
     #include  <unistd.h>
     #include  <sys/stat.h>
     #ifdef __GNUWIN32__
-        #include <windows.h>
+        #include "wx/msw/wrapwin.h"
     #endif
 #elif defined(__DOS__)
     #if defined(__WATCOMC__)
index 41e11eb45cdf69320c2b8f8f544c4b202fff61f6..6978a4a25cc3ad5a8b94466aa4c7dc90536d8d60 100644 (file)
 #endif
 
 #ifdef __WINDOWS__
-    #include <windows.h>
+    #include "wx/msw/wrapwin.h"
     #include "wx/msw/mslu.h"
 
     // for _getcwd
index 181b06705efdf7bd43e695253d62d89025ed73c5..674265b46280b8846b957e7e69cc1d408fb8bd4d 100644 (file)
@@ -86,8 +86,7 @@
 
 // For GetShort/LongPathName
 #ifdef __WIN32__
-#include <windows.h>
-#include "wx/msw/winundef.h"
+#include "wx/msw/wrapwin.h"
 #endif
 
 #ifdef __WXWINCE__
index 2c01bccc067aa6b0791df6ccf32ea1aa11591225..20450b557e11dd12a355e1dad5b8fd324d1716d9 100644 (file)
@@ -43,7 +43,7 @@
 #include <string.h>
 
 #ifdef __WXMSW__
-#include <windows.h>
+#include "wx/msw/wrapwin.h"
 #endif
 
 #ifdef __WXMOTIF__
index 1ba36f910c643e169b8a71280eae52f995889100..ffe3162333d1e43d7b063047bec7931f243557b8 100644 (file)
@@ -43,7 +43,7 @@
 #endif
 
 #ifdef __WXMSW__
-#include <windows.h>
+#include "wx/msw/wrapwin.h"
 #endif
 
 //-----------------------------------------------------------------------------
index 98008589d12fd97f8916b1367e626f388781edd2..b0a4e997e40bb57fa35412942d7264a3d051e91e 100644 (file)
@@ -35,7 +35,7 @@
 //     defining HAVE_BOOLEAN.
 #if defined(__WXMSW__) && (defined(__MWERKS__) || defined(__DIGITALMARS__) || (defined(__WATCOMC__) && __WATCOMC__ < 1200))
     #define HAVE_BOOLEAN
-    #include <windows.h>
+    #include "wx/msw/wrapwin.h"
 #endif
 
 extern "C"
index 5ec13fc7dbd6e3c96e4e30f2b27dcd9da3d53bf3..ce4051ad8404440ac3d7a42633855ec57924491a 100644 (file)
@@ -54,7 +54,7 @@
 #include <string.h>
 
 #ifdef __WXMSW__
-#include <windows.h>
+#include "wx/msw/wrapwin.h"
 
 #ifdef GetClassInfo
 #undef GetClassInfo
index b60ad489b545b81d74194c50abd6bbb778d7b9ff..e207a9a4b1e6be226b50480aaf61bc20d7e74138 100644 (file)
@@ -39,7 +39,7 @@
 #include <string.h>
 
 #ifdef __WXMSW__
-#include <windows.h>
+#include "wx/msw/wrapwin.h"
 #include <commdlg.h>
 
 #ifndef __WIN32__
index 3b2f3dc9a11fcfea95a77942cf0d7d530edafd1d..17231b4b71e32abde1ab6db19d0ecf7979213016 100644 (file)
@@ -49,7 +49,6 @@
 #include "wx/quantize.h"
 
 #ifdef __WXMSW__
-#include <windows.h>
 #include "wx/msw/private.h"
 #endif
 
index f11495333211ad3a537ec6e7959e361597030993..f6f5638032b4e0ce8df0911bd8804c8671088c5d 100644 (file)
@@ -41,7 +41,7 @@
 // ----------------------------------------------------------------------------
 
 #if defined(__WIN32__)
-    #include <windows.h>
+    #include "wx/msw/wrapwin.h"
 #endif
 
 #if defined(__WIN32__) && !defined(HAVE_FTIME) && !defined(__MWERKS__) && !defined(__WXWINCE__)
index 4274114bf99489537bbcaf4f7b02ec4fe8788c3b..df2f156ce3d11d98945b89a638b41d538ecab4e8 100644 (file)
@@ -47,7 +47,7 @@
 #include "wx/ownerdrw.h"
 #include "wx/checklst.h"
 
-#include <windows.h>
+#include "wx/msw/wrapwin.h"
 #include <windowsx.h>
 
 #include "wx/msw/private.h"
index fd07c1ffa63e6b36abc2791c2844e0b1a98f7c81..3bd80dd0690110e176468147bbbc89a96b7a1c4e 100644 (file)
@@ -52,7 +52,6 @@
 #include "wx/clipbrd.h"
 
 #include <string.h>
-#include <windows.h>
 
 #include "wx/msw/private.h"
 
index 84ad0389ec7f1c7e02b4bf0ee1299dcb6faf4fe0..3e9571bc9e4f9750f05b012a0d7ebfbd3c8a7957 100644 (file)
@@ -44,8 +44,6 @@
 
 #if wxUSE_COLOURDLG
 
-#include <windows.h>
-
 #include "wx/msw/private.h"
 #include "wx/colordlg.h"
 #include "wx/cmndata.h"
index 90074735d9eb88dcb8a0e923de9a590420b140c0..b41790d4dfa9015f25130ebd4d161b4162d1e062 100644 (file)
@@ -24,7 +24,6 @@
 #include "wx/msw/private.h"
 
 #include <string.h>
-#include <windows.h>
 
 IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
 
index 3b5da991bb64b7d9a0aeff81dd3c3052dea9878b..f49d2c0d48132ea579864f78eff3815ed145fb99 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "wx/msw/crashrpt.h"
 
-#include <windows.h>
+#include "wx/msw/wrapwin.h"
 #include <imagehlp.h>
 #include "wx/msw/private.h"
 
index cb980679492350f6a9f4de034efbaeff1fbed387..ce6914ee5c22028de5f2c5dd3037ebd196978fe4 100644 (file)
@@ -43,7 +43,6 @@
 #include "wx/msw/private.h"
 
 #include <string.h>
-#include <windows.h>
 #include <ddeml.h>
 
 #ifdef __GNUWIN32_OLD__
index e03824cc3f3546441c4babda7cebd4115670cb96..722fda855784ee523a6ee2068f2712473972a6ed 100644 (file)
@@ -41,7 +41,7 @@
 // _WINDOWS_ is defined when windows.h is included,
 // __WXMSW__ is defined for MS Windows compilation
 #if       defined(__WXMSW__) && !defined(_WINDOWS_)
-  #include  <windows.h>
+  #include  "wx/msw/wrapwin.h"
 #endif  //windows.h
 
 // ----------------------------------------------------------------------------
index 05d2d1c7ad27c345cf8be1cd0f8780ec937a9261..62e8024db4acff2c0f78a0404e9b7296c340ea05 100644 (file)
@@ -38,7 +38,7 @@
 #include "wx/log.h"
 #include "wx/access.h"
 
-#include <windows.h>
+#include "wx/msw/wrapwin.h"
 
 // for some compilers, the entire ole2.h must be included, not only oleauto.h
 #if wxUSE_NORLANDER_HEADERS || defined(__WATCOMC__)
@@ -49,7 +49,6 @@
 #include <oleacc.h>
 #include <winable.h>
 
-#include "wx/msw/winundef.h"
 #include "wx/msw/ole/oleutils.h"
 
 #ifndef CHILDID_SELF
index 37818b5760f2a346ef58cdd4674405ac3b3329df..759dc6ba810658b67b5fe6c5792f882d16014b21 100644 (file)
@@ -43,7 +43,7 @@
 #ifdef __WIN32__
     #if !defined(__GNUWIN32__) || wxUSE_NORLANDER_HEADERS
         #if wxCHECK_W32API_VERSION( 1, 0 )
-            #include <windows.h>
+            #include "wx/msw/wrapwin.h"
         #endif
         #include <shlobj.h>            // for DROPFILES structure
     #endif
index 65f125f6ab74a6bb6de93caa001a5458834f251e..cdcbe667144ca751883f9978ca6a2b35146f024b 100644 (file)
@@ -30,7 +30,7 @@
 
 // standard headers
 #if wxCHECK_W32API_VERSION( 1, 0 )
-    #include <windows.h>
+    #include "wx/msw/wrapwin.h"
 #endif
 #include  <rpc.h>                       // UUID related functions
 
index 188b50632bd0137932190eb3dcbd4ee492fa6f11..9462ef29f0ed6452b45dd8ce2b467c5671d66009 100644 (file)
@@ -36,7 +36,7 @@
 #define   WIN32_LEAN_AND_MEAN
 */
 
-#include  <windows.h>
+#include  "wx/msw/wrapwin.h"
 
 #ifdef __WXWINCE__
 #include "wx/msw/private.h"
index 861ffd88588133856cd4f5f45c8a72064ad05f20..ae90474c7b743b3ad8e14ca6646c849eda55e82f 100644 (file)
@@ -28,9 +28,8 @@
 
 #if wxUSE_UXTHEME
 
-#include <windows.h>
+#include "wx/msw/wrapwin.h"
 
-#include "wx/msw/winundef.h"
 #include "wx/msw/uxtheme.h"
 #include "wx/msw/private.h"
 #include "wx/app.h"         // for GetComCtl32Version
index 083a7abc84f0db879435b15e895db46d60fecc37..610ef77cefa3ac595ac1935ea7271559c14fb3f8 100644 (file)
@@ -30,7 +30,6 @@
 #include "wx/msw/wave.h"
 #include "wx/msw/private.h"
 
-#include <windows.h>
 #include <windowsx.h>
 
 #if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
index 7891b54e4f8b95bed6dd0e16b2c9deaad0550a2a..ea6b9545d616c2f20827849cb76b8515e00abee0 100644 (file)
@@ -12,7 +12,7 @@
 
 */
 
-#include <windows.h>
+#include "wx/msw/wrapwin.h"
 #include <tchar.h>
 #include <winsock.h>
 #include <string.h>
index 99814647fa924f93c7a64126c166e2e0650af138..9f1c570d10cd1fb29320d39ab54b5e0d4e2d7125 100644 (file)
@@ -29,8 +29,7 @@
 #endif
 
 #ifndef WX_PRECOMP
-    #include <windows.h>
-    #include "wx/msw/winundef.h"
+    #include "wx/msw/wrapwin.h"
 #endif
 
 #include "wx/msw/wince/time.h"
index 01bca8a3f5c25e687001710234f1ee2d2e58e3ff..d57a865456eceed0fa3562b7740ea3790c8d1f1c 100644 (file)
@@ -29,8 +29,7 @@
 #endif
 
 #ifndef WX_PRECOMP
-    #include <windows.h>
-    #include "wx/msw/winundef.h"
+    #include "wx/msw/wrapwin.h"
     #include "wx/window.h"
     #include "wx/accel.h"
     #include "wx/setup.h"