]> git.saurik.com Git - wxWidgets.git/blob - include/msvc/wx/setup.h
remove SetBackgroundStyle call from OnInternalIdle, it should be done from realize...
[wxWidgets.git] / include / msvc / wx / setup.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: msvc/wx/setup.h
3 // Purpose: wrapper around the real wx/setup.h for Visual C++
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 2004-12-12
7 // RCS-ID: $Id$
8 // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _MSC_VER
13 #error "This file should only be included when using Microsoft Visual C++"
14 #endif
15
16 // VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
17 // the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
18 // explicitly!
19
20 #include "wx/version.h"
21 #include "wx/cpp.h"
22
23 // notice that wxSUFFIX_DEBUG is a string but wxSUFFIX itself must be an
24 // identifier as string concatenation is not done inside #include where we
25 // need it
26 #ifdef _DEBUG
27 #define wxSUFFIX_DEBUG "d"
28 #ifdef _UNICODE
29 #define wxSUFFIX ud
30 #else // !_UNICODE
31 #define wxSUFFIX d
32 #endif // _UNICODE/!_UNICODE
33 #else
34 #define wxSUFFIX_DEBUG ""
35 #ifdef _UNICODE
36 #define wxSUFFIX u
37 #else // !_UNICODE
38 // don't define wxSUFFIX at all as preprocessor operations don't work
39 // with empty values so we need to check for this case specially below
40 #endif // _UNICODE/!_UNICODE
41 #endif
42
43 // compiler-specific prefix: by default it's always just "vc" for compatibility
44 // reasons but if you use multiple MSVC versions you probably build them with
45 // COMPILER_PREFIX=vcXX and in this case you may want to either predefine
46 // wxMSVC_VERSION as "XX" or define wxMSVC_VERSION_AUTO to use the appropriate
47 // version depending on the compiler used
48 #ifdef wxMSVC_VERSION
49 #define wxCOMPILER_PREFIX wxCONCAT2(vc, wxMSVC_VERSION)
50 #elif defined(wxMSVC_VERSION_AUTO)
51 #if _MSC_VER == 1200
52 #define wxCOMPILER_PREFIX vc60
53 #elif _MSC_VER == 1300
54 #define wxCOMPILER_PREFIX vc70
55 #elif _MSC_VER == 1310
56 #define wxCOMPILER_PREFIX vc71
57 #elif _MSC_VER == 1400
58 #define wxCOMPILER_PREFIX vc80
59 #elif _MSC_VER == 1500
60 #define wxCOMPILER_PREFIX vc90
61 #elif _MSC_VER == 1600
62 #define wxCOMPILER_PREFIX vc100
63 #else
64 #error "Unknown MSVC compiler version, please report to wx-dev."
65 #endif
66 #else
67 #define wxCOMPILER_PREFIX vc
68 #endif
69
70 // architecture-specific part: not used (again, for compatibility), for x86
71 #if defined(_M_X64)
72 #define wxARCH_SUFFIX _amd64
73 #elif defined(_M_IA64)
74 #define wxARCH_SUFFIX _ia64
75 #else // assume _M_IX86
76 #define wxARCH_SUFFIX
77 #endif
78
79 #ifdef WXUSINGDLL
80 #define wxLIB_SUBDIR wxCONCAT3(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _dll)
81 #else // !DLL
82 #define wxLIB_SUBDIR wxCONCAT3(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _lib)
83 #endif // DLL/!DLL
84
85
86 // the real setup.h header file we need is in the build-specific directory,
87 // construct the path to it
88 #ifdef wxSUFFIX
89 #define wxSETUPH_PATH \
90 wxCONCAT5(../../../lib/, wxLIB_SUBDIR, /msw, wxSUFFIX, /wx/setup.h)
91 #else // suffix is empty
92 #define wxSETUPH_PATH \
93 wxCONCAT3(../../../lib/, wxLIB_SUBDIR, /msw/wx/setup.h)
94 #endif
95
96 #define wxSETUPH_PATH_STR wxSTRINGIZE(wxSETUPH_PATH)
97
98 #include wxSETUPH_PATH_STR
99
100
101 // the library names depend on the build, these macro builds the correct
102 // library name for the given base name
103 #ifdef wxSUFFIX
104 #define wxSUFFIX_STR wxSTRINGIZE(wxSUFFIX)
105 #else // suffix is empty
106 #define wxSUFFIX_STR ""
107 #endif
108 #define wxSHORT_VERSION_STRING \
109 wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION)
110
111 #define wxWX_LIB_NAME(name, subname) \
112 "wx" name wxSHORT_VERSION_STRING wxSUFFIX_STR subname
113
114 #define wxBASE_LIB_NAME(name) wxWX_LIB_NAME("base", "_" name)
115 #define wxMSW_LIB_NAME(name) wxWX_LIB_NAME("msw", "_" name)
116
117 // this one is for 3rd party libraries: they don't have the version number
118 // in their names and usually exist in ANSI version only (except for regex)
119 #define wx3RD_PARTY_LIB_NAME(name) "wx" name wxSUFFIX_DEBUG
120
121 // special version for regex as it does have a Unicode version
122 #define wx3RD_PARTY_LIB_NAME_U(name) "wx" name wxSUFFIX_STR
123
124 #pragma comment(lib, wxWX_LIB_NAME("base", ""))
125
126 #ifndef wxNO_NET_LIB
127 #pragma comment(lib, wxBASE_LIB_NAME("net"))
128 #endif
129 #ifndef wxNO_XML_LIB
130 #pragma comment(lib, wxBASE_LIB_NAME("xml"))
131 #endif
132 #if wxUSE_REGEX && !defined(wxNO_REGEX_LIB)
133 #pragma comment(lib, wx3RD_PARTY_LIB_NAME_U("regex"))
134 #endif
135
136 #if wxUSE_GUI
137 #if wxUSE_XML && !defined(wxNO_EXPAT_LIB)
138 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat"))
139 #endif
140 #if wxUSE_LIBJPEG && !defined(wxNO_JPEG_LIB)
141 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("jpeg"))
142 #endif
143 #if wxUSE_LIBPNG && !defined(wxNO_PNG_LIB)
144 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("png"))
145 #endif
146 #if wxUSE_LIBTIFF && !defined(wxNO_TIFF_LIB)
147 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("tiff"))
148 #endif
149 #if wxUSE_ZLIB && !defined(wxNO_ZLIB_LIB)
150 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("zlib"))
151 #endif
152
153 #pragma comment(lib, wxMSW_LIB_NAME("core"))
154
155 #ifndef wxNO_ADV_LIB
156 #pragma comment(lib, wxMSW_LIB_NAME("adv"))
157 #endif
158
159 #ifndef wxNO_HTML_LIB
160 #pragma comment(lib, wxMSW_LIB_NAME("html"))
161 #endif
162 #if wxUSE_GLCANVAS && !defined(wxNO_GL_LIB)
163 #pragma comment(lib, wxMSW_LIB_NAME("gl"))
164 #endif
165 #if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB)
166 #pragma comment(lib, wxMSW_LIB_NAME("qa"))
167 #endif
168 #if wxUSE_XRC && !defined(wxNO_XRC_LIB)
169 #pragma comment(lib, wxMSW_LIB_NAME("xrc"))
170 #endif
171 #if wxUSE_AUI && !defined(wxNO_AUI_LIB)
172 #pragma comment(lib, wxMSW_LIB_NAME("aui"))
173 #endif
174 #if wxUSE_PROPGRID && !defined(wxNO_PROPGRID_LIB)
175 #pragma comment(lib, wxMSW_LIB_NAME("propgrid"))
176 #endif
177 #if wxUSE_RIBBON && !defined(wxNO_RIBBON_LIB)
178 #pragma comment(lib, wxMSW_LIB_NAME("ribbon"))
179 #endif
180 #if wxUSE_RICHTEXT && !defined(wxNO_RICHTEXT_LIB)
181 #pragma comment(lib, wxMSW_LIB_NAME("richtext"))
182 #endif
183 #if wxUSE_MEDIACTRL && !defined(wxNO_MEDIA_LIB)
184 #pragma comment(lib, wxMSW_LIB_NAME("media"))
185 #endif
186 #if wxUSE_STC && !defined(wxNO_STC_LIB)
187 #pragma comment(lib, wxMSW_LIB_NAME("stc"))
188 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("scintilla"))
189 #endif
190 #endif // wxUSE_GUI
191
192
193 #ifndef WXUSINGDLL
194 // Make sure all required system libraries are added to the linker too when
195 // using static libraries.
196 #pragma comment(lib, "kernel32")
197 #pragma comment(lib, "user32")
198 #pragma comment(lib, "gdi32")
199 #pragma comment(lib, "comdlg32")
200 #pragma comment(lib, "winspool")
201 #pragma comment(lib, "winmm")
202 #pragma comment(lib, "shell32")
203 #pragma comment(lib, "comctl32")
204 #pragma comment(lib, "ole32")
205 #pragma comment(lib, "oleaut32")
206 #pragma comment(lib, "uuid")
207 #pragma comment(lib, "rpcrt4")
208 #pragma comment(lib, "advapi32")
209 #pragma comment(lib, "wsock32")
210 #if wxUSE_URL_NATIVE
211 #pragma comment(lib, "wininet")
212 #endif
213 #endif // !WXUSINGDLL