]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/wrapwin.h
c458c326a3319d616804e162acf0634686bd9f17
[wxWidgets.git] / include / wx / msw / wrapwin.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: msw/wrapwin.h
3 // Purpose: Wrapper around <windows.h>, to be included instead of it
4 // Author: Vaclav Slavik
5 // Created: 2003/07/22
6 // RCS-ID: $Id$
7 // Copyright: (c) 2003 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_WRAPWIN_H_
12 #define _WX_WRAPWIN_H_
13
14 #include "wx/platform.h"
15
16 #ifndef STRICT
17 #define STRICT 1
18 #endif
19
20 // don't define min() and max() as macros, they conflict with standard C++ ones
21 #ifndef NOMINMAX
22 #define NOMINMAX
23 #endif // NOMINMAX
24
25 // before including windows.h, define version macros at (currently) maximal
26 // values because we do all our checks at run-time anyhow
27 #ifndef _WIN32_WINNT
28 #define _WIN32_WINNT 0x0600
29 #endif
30 #ifndef WINVER
31 #define WINVER 0x0600
32 #endif
33
34 #include <windows.h>
35
36 #ifdef __WXWINCE__
37 // this doesn't make any sense knowing that windows.h includes all these
38 // headers anyhow, but the fact remains that when building using eVC 4 the
39 // functions and constants from these headers are not defined unless we
40 // explicitly include them ourselves -- how is it possible is beyond me...
41 #include <winbase.h>
42 #include <wingdi.h>
43 #include <winuser.h>
44
45 // this one OTOH contains many useful CE-only functions
46 #include <shellapi.h>
47 #endif // __WXWINCE__
48
49 #include "wx/msw/winundef.h"
50
51 // types DWORD_PTR, ULONG_PTR and so on might be not defined in old headers but
52 // unfortunately I don't know of any standard way to test for this (as they're
53 // typedefs and not #defines), so simply overwrite them in any case in Win32
54 // mode -- and if compiling for Win64 they'd better have new headers anyhow
55 //
56 // this is ugly but what else can we do? even testing for compiler version
57 // wouldn't help as you can perfectly well be using an older compiler (VC6)
58 // with newer SDK headers
59 #if !defined(__WIN64__) && !defined(__WXWINCE__)
60 #define UINT_PTR unsigned int
61 #define LONG_PTR long
62 #define ULONG_PTR unsigned long
63 #define DWORD_PTR unsigned long
64 #endif // !__WIN64__
65
66 #endif // _WX_WRAPWIN_H_
67