]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/wrapwin.h
eVC3 build fix.
[wxWidgets.git] / include / wx / msw / wrapwin.h
CommitLineData
9ed0d735 1/////////////////////////////////////////////////////////////////////////////
f9438023 2// Name: msw/wrapwin.h
9ed0d735 3// Purpose: Wrapper around <windows.h>, to be included instead of it
2f552802 4// Author: Vaclav Slavik
9ed0d735
VS
5// Created: 2003/07/22
6// RCS-ID: $Id$
2f552802 7// Copyright: (c) 2003 Vaclav Slavik
65571936 8// Licence: wxWindows licence
9ed0d735
VS
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_WRAPWIN_H_
12#define _WX_WRAPWIN_H_
13
14#include "wx/platform.h"
15
4edb3b83 16// strict type checking to detect conversion from HFOO to HBAR at compile-time
9ed0d735
VS
17#ifndef STRICT
18 #define STRICT 1
19#endif
20
4edb3b83
VZ
21// this macro tells windows.h to not define min() and max() as macros: we need
22// this as otherwise they conflict with standard C++ functions
a97cd798
VZ
23#ifndef NOMINMAX
24 #define NOMINMAX
25#endif // NOMINMAX
baec3aee 26
4edb3b83 27
1033b836
VZ
28// before including windows.h, define version macros at (currently) maximal
29// values because we do all our checks at run-time anyhow
4edb3b83
VZ
30#ifndef WINVER
31 // the only exception to the above is MSVC 6 which has a time bomb in its
32 // headers: they warn against using them with WINVER >= 0x0500 as they
33 // contain only part of the declarations and they're not always correct, so
34 // don't define WINVER for it at all as this allows everything to work as
35 // expected both with standard VC6 headers (which define WINVER as 0x0400
36 // by default) and headers from a newer SDK (which may define it as 0x0500)
37 #if !defined(__VISUALC__) || (__VISUALC__ >= 1300)
38 #define WINVER 0x0600
39 #endif
40#endif
41
1033b836
VZ
42#ifndef _WIN32_WINNT
43 #define _WIN32_WINNT 0x0600
44#endif
4edb3b83 45
1033b836 46
9ed0d735 47#include <windows.h>
14d3c9f7
VZ
48
49#ifdef __WXWINCE__
50 // this doesn't make any sense knowing that windows.h includes all these
51 // headers anyhow, but the fact remains that when building using eVC 4 the
52 // functions and constants from these headers are not defined unless we
53 // explicitly include them ourselves -- how is it possible is beyond me...
54 #include <winbase.h>
55 #include <wingdi.h>
56 #include <winuser.h>
57
58 // this one OTOH contains many useful CE-only functions
59 #include <shellapi.h>
60#endif // __WXWINCE__
61
4edb3b83
VZ
62
63// #undef the macros defined in winsows.h which conflict with code elsewhere
9ed0d735
VS
64#include "wx/msw/winundef.h"
65
4edb3b83 66
f9438023
VZ
67// types DWORD_PTR, ULONG_PTR and so on might be not defined in old headers but
68// unfortunately I don't know of any standard way to test for this (as they're
69// typedefs and not #defines), so simply overwrite them in any case in Win32
70// mode -- and if compiling for Win64 they'd better have new headers anyhow
71//
72// this is ugly but what else can we do? even testing for compiler version
73// wouldn't help as you can perfectly well be using an older compiler (VC6)
74// with newer SDK headers
d61c1a6f 75#if !defined(__WIN64__) && !defined(__WXWINCE__)
f9438023 76 #define UINT_PTR unsigned int
ebb2300f 77 #define LONG_PTR long
f9438023
VZ
78 #define ULONG_PTR unsigned long
79 #define DWORD_PTR unsigned long
80#endif // !__WIN64__
81
2f552802
VZ
82#endif // _WX_WRAPWIN_H_
83