File: wrapwin.h

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (70 lines) | stat: -rw-r--r-- 2,328 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/////////////////////////////////////////////////////////////////////////////
// Name:        wx/msw/wrapwin.h
// Purpose:     Wrapper around <windows.h>, to be included instead of it
// Author:      Vaclav Slavik
// Created:     2003/07/22
// Copyright:   (c) 2003 Vaclav Slavik
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef _WX_WRAPWIN_H_
#define _WX_WRAPWIN_H_

#include "wx/platform.h"

// before including windows.h, define version macros at (currently) maximal
// values because we do all our checks at run-time anyhow
#include "wx/msw/winver.h"

// strict type checking to detect conversion from HFOO to HBAR at compile-time
#ifndef STRICT
    #define STRICT 1
#endif

// this macro tells windows.h to not define min() and max() as macros: we need
// this as otherwise they conflict with standard C++ functions
#ifndef NOMINMAX
    #define NOMINMAX
#endif // NOMINMAX

// Disable any warnings inside Windows headers.
#ifdef __VISUALC__
    #pragma warning(push, 1)

    // Some warnings, which are disabled by default but could be enabled by the
    // application code before including wx headers, are somehow not disabled
    // even by switching to warning level 1, so disable them explicitly.

    // expression before comma has no effect; expected expression with
    // side-effect
    #pragma warning(disable:4548)

    // 'symbol' is not defined as a preprocessor macro, replacing with '0' for
    // 'directives'
    #pragma warning(disable:4668)
#endif

// When the application wants to use <winsock2.h> (this is required for IPv6
// support, for example), we must include it before winsock.h, and as windows.h
// includes winsock.h, we have to do it before including it.
#if wxUSE_SOCKETS && wxUSE_WINSOCK2
    // Avoid warnings about Winsock 1.x functions deprecated in Winsock 2 that
    // we still use (and that will certainly remain available for the
    // foreseeable future anyhow).
    #ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
        #define _WINSOCK_DEPRECATED_NO_WARNINGS
    #endif

    #include <winsock2.h>
#endif

#include <windows.h>

#ifdef __VISUALC__
    #pragma warning(pop)
#endif

// #undef the macros defined in windows.h which conflict with code elsewhere
#include "wx/msw/winundef.h"

#endif // _WX_WRAPWIN_H_