]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/chkconf.h
Make wxComboCtrlBase::Set*groundColour() methods public.
[wxWidgets.git] / include / wx / msw / chkconf.h
CommitLineData
01ebf752
JS
1/*
2 * Name: wx/msw/chkconf.h
3 * Purpose: Compiler-specific configuration checking
4 * Author: Julian Smart
5 * Modified by:
6 * Created: 01/02/97
01ebf752 7 * Copyright: (c) Julian Smart
65571936 8 * Licence: wxWindows licence
01ebf752
JS
9 */
10
34cbe514
RN
11/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
12
01ebf752
JS
13#ifndef _WX_MSW_CHKCONF_H_
14#define _WX_MSW_CHKCONF_H_
15
74987083 16/* ensure that MSW-specific settings are defined */
07b1232d
VZ
17#ifndef wxUSE_ACTIVEX
18# ifdef wxABORT_ON_CONFIG_ERROR
19# error "wxUSE_ACTIVEX must be defined."
20# else
21# define wxUSE_ACTIVEX 0
22# endif
23#endif /* !defined(wxUSE_ACTIVEX) */
24
25#ifndef wxUSE_CRASHREPORT
26# ifdef wxABORT_ON_CONFIG_ERROR
27# error "wxUSE_CRASHREPORT must be defined."
28# else
29# define wxUSE_CRASHREPORT 0
30# endif
31#endif /* !defined(wxUSE_CRASHREPORT) */
32
74987083
VZ
33#ifndef wxUSE_DC_CACHEING
34# ifdef wxABORT_ON_CONFIG_ERROR
35# error "wxUSE_DC_CACHEING must be defined"
36# else
37# define wxUSE_DC_CACHEING 1
38# endif
39#endif /* wxUSE_DC_CACHEING */
40
07b1232d
VZ
41#ifndef wxUSE_DIALUP_MANAGER
42# ifdef wxABORT_ON_CONFIG_ERROR
43# error "wxUSE_DIALUP_MANAGER must be defined."
44# else
45# define wxUSE_DIALUP_MANAGER 0
46# endif
47#endif /* !defined(wxUSE_DIALUP_MANAGER) */
74987083 48
07b1232d
VZ
49#ifndef wxUSE_MS_HTML_HELP
50# ifdef wxABORT_ON_CONFIG_ERROR
51# error "wxUSE_MS_HTML_HELP must be defined."
52# else
53# define wxUSE_MS_HTML_HELP 0
54# endif
55#endif /* !defined(wxUSE_MS_HTML_HELP) */
01ebf752 56
61873536
VZ
57#ifndef wxUSE_INICONF
58# ifdef wxABORT_ON_CONFIG_ERROR
59# error "wxUSE_INICONF must be defined."
60# else
61# define wxUSE_INICONF 0
62# endif
63#endif /* !defined(wxUSE_INICONF) */
64
07b1232d
VZ
65#ifndef wxUSE_OLE
66# ifdef wxABORT_ON_CONFIG_ERROR
67# error "wxUSE_OLE must be defined."
68# else
69# define wxUSE_OLE 0
70# endif
71#endif /* !defined(wxUSE_OLE) */
12bdd77c 72
07b1232d
VZ
73#ifndef wxUSE_OLE_AUTOMATION
74# ifdef wxABORT_ON_CONFIG_ERROR
75# error "wxUSE_OLE_AUTOMATION must be defined."
76# else
77# define wxUSE_OLE_AUTOMATION 0
78# endif
79#endif /* !defined(wxUSE_OLE_AUTOMATION) */
80
23bd008a
VZ
81#ifndef wxUSE_TASKBARICON_BALLOONS
82# ifdef wxABORT_ON_CONFIG_ERROR
83# error "wxUSE_TASKBARICON_BALLOONS must be defined."
84# else
85# define wxUSE_TASKBARICON_BALLOONS 0
86# endif
87#endif /* wxUSE_TASKBARICON_BALLOONS */
88
07b1232d
VZ
89#ifndef wxUSE_UNICODE_MSLU
90# ifdef wxABORT_ON_CONFIG_ERROR
91# error "wxUSE_UNICODE_MSLU must be defined."
92# else
93# define wxUSE_UNICODE_MSLU 0
94# endif
95#endif /* wxUSE_UNICODE_MSLU */
96
97#ifndef wxUSE_UXTHEME
98# ifdef wxABORT_ON_CONFIG_ERROR
99# error "wxUSE_UXTHEME must be defined."
100# else
101# define wxUSE_UXTHEME 0
102# endif
103#endif /* wxUSE_UXTHEME */
104
820a7a1b
VZ
105/*
106 * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but
107 * wxUSE_UNICODE is not as this would make it impossible to simply set the
108 * former in wx/setup.h as then the library wouldn't compile in non-Unicode
109 * configurations, so instead simply unset it silently when it doesn't make
110 * sense.
111 */
112#if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
113# undef wxUSE_UNICODE_MSLU
114# define wxUSE_UNICODE_MSLU 0
219b657f
JS
115#endif
116
07b1232d 117
219b657f 118/*
07b1232d 119 * disable the settings which don't work for some compilers
219b657f
JS
120 */
121
07b1232d
VZ
122#ifndef wxUSE_NORLANDER_HEADERS
123# if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \
124 ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
125# define wxUSE_NORLANDER_HEADERS 1
126# else
127# define wxUSE_NORLANDER_HEADERS 0
128# endif
820a7a1b
VZ
129#endif
130
23bd008a
VZ
131/*
132 * See WINVER definition in wx/msw/wrapwin.h for the explanation of this test
133 * logic.
134 */
135#if (defined(__VISUALC__) && (__VISUALC__ < 1300)) && \
136 (!defined(WINVER) || WINVER < 0x0500)
137# undef wxUSE_TASKBARICON_BALLOONS
138# define wxUSE_TASKBARICON_BALLOONS 0
139#endif
140
b3dfbbc9 141/*
3e3a3e17
VZ
142 * All of the settings below require SEH support (__try/__catch) and can't work
143 * without it.
b3dfbbc9 144 */
3e3a3e17
VZ
145#if !defined(_MSC_VER) && \
146 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
820a7a1b
VZ
147# undef wxUSE_ON_FATAL_EXCEPTION
148# define wxUSE_ON_FATAL_EXCEPTION 0
3e3a3e17 149
820a7a1b
VZ
150# undef wxUSE_CRASHREPORT
151# define wxUSE_CRASHREPORT 0
3e3a3e17 152
820a7a1b
VZ
153# undef wxUSE_STACKWALKER
154# define wxUSE_STACKWALKER 0
3b2b40b4 155#endif /* compiler doesn't support SEH */
b3dfbbc9 156
01ebf752 157#if defined(__GNUWIN32__)
5e7f00a1
VZ
158 /* These don't work as expected for mingw32 and cygwin32 */
159# undef wxUSE_MEMORY_TRACING
160# define wxUSE_MEMORY_TRACING 0
161
162# undef wxUSE_GLOBAL_MEMORY_OPERATORS
163# define wxUSE_GLOBAL_MEMORY_OPERATORS 0
164
165# undef wxUSE_DEBUG_NEW_ALWAYS
166# define wxUSE_DEBUG_NEW_ALWAYS 0
01ebf752 167
5e7f00a1
VZ
168/* some Cygwin versions don't have wcslen */
169# if defined(__CYGWIN__) || defined(__CYGWIN32__)
170# if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
171# undef wxUSE_WCHAR_T
172# define wxUSE_WCHAR_T 0
173# endif
01ebf752 174#endif
5e7f00a1
VZ
175
176#endif /* __GNUWIN32__ */
01ebf752 177
16f10340
VZ
178/* wxUSE_MFC is not defined when using configure as it doesn't make sense for
179 gcc or mingw32 anyhow */
180#ifndef wxUSE_MFC
181 #define wxUSE_MFC 0
182#endif /* !defined(wxUSE_MFC) */
183
01ebf752
JS
184/* MFC duplicates these operators */
185#if wxUSE_MFC
5e7f00a1
VZ
186# undef wxUSE_GLOBAL_MEMORY_OPERATORS
187# define wxUSE_GLOBAL_MEMORY_OPERATORS 0
01ebf752 188
5e7f00a1
VZ
189# undef wxUSE_DEBUG_NEW_ALWAYS
190# define wxUSE_DEBUG_NEW_ALWAYS 0
191#endif /* wxUSE_MFC */
01ebf752
JS
192
193#if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
820a7a1b
VZ
194 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
195# undef wxUSE_DRAG_AND_DROP
196# define wxUSE_DRAG_AND_DROP 0
01ebf752
JS
197#endif
198
d7bc7fec 199#if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
820a7a1b
VZ
200# undef wxUSE_CHECKLISTBOX
201# define wxUSE_CHECKLISTBOX 0
01ebf752
JS
202#endif
203
0e871ad0
WS
204#if wxUSE_SPINCTRL
205# if !wxUSE_SPINBTN
206# ifdef wxABORT_ON_CONFIG_ERROR
207# error "wxSpinCtrl requires wxSpinButton on MSW"
208# else
209# undef wxUSE_SPINBTN
210# define wxUSE_SPINBTN 1
211# endif
212# endif
213#endif
214
da98e157
VZ
215/*
216 Win64-specific checks.
217 */
218#ifdef __WIN64__
219# if wxUSE_STACKWALKER
da98e157
VZ
220# undef wxUSE_CRASHREPORT
221# define wxUSE_CRASHREPORT 0
222# endif
223#endif /* __WIN64__ */
224
225
226/*
227 Compiler-specific checks.
228 */
1b5f8335 229
e78c47e3 230/* Borland */
1b5f8335
VZ
231#ifdef __BORLANDC__
232
233#if __BORLANDC__ < 0x500
5e7f00a1
VZ
234 /* BC++ 4.0 can't compile JPEG library */
235# undef wxUSE_LIBJPEG
236# define wxUSE_LIBJPEG 0
01ebf752
JS
237#endif
238
239/* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
1b5f8335 240#if defined(WXMAKINGDLL) || defined(WXUSINGDLL)
5e7f00a1
VZ
241# undef wxUSE_DEBUG_NEW_ALWAYS
242# define wxUSE_DEBUG_NEW_ALWAYS 0
01ebf752
JS
243#endif
244
1b5f8335
VZ
245#endif /* __BORLANDC__ */
246
90a752c2
JS
247/* DMC++ doesn't have definitions for date picker control, so use generic control
248 */
90a752c2 249#ifdef __DMC__
820a7a1b
VZ
250# if wxUSE_DATEPICKCTRL
251# undef wxUSE_DATEPICKCTRL_GENERIC
252# undef wxUSE_DATEPICKCTRL
253# endif
254# define wxUSE_DATEPICKCTRL 0
255# define wxUSE_DATEPICKCTRL_GENERIC 1
90a752c2
JS
256#endif
257
a1f48575 258
b55c3716 259
a1f48575
VZ
260/*
261 un/redefine the options which we can't compile (after checking that they're
262 defined
263 */
264#ifdef __WINE__
07b1232d
VZ
265# if wxUSE_ACTIVEX
266# undef wxUSE_ACTIVEX
267# define wxUSE_ACTIVEX 0
268# endif /* wxUSE_ACTIVEX */
269
270# if wxUSE_UNICODE_MSLU
271# undef wxUSE_UNICODE_MSLU
272# define wxUSE_UNICODE_MSLU 0
273# endif /* wxUSE_UNICODE_MSLU */
28efe654 274#endif /* __WINE__ */
a1f48575 275
b55c3716 276
ca5c6ac3 277/* check settings consistency for MSW-specific ones */
07b1232d
VZ
278#if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
279# ifdef wxABORT_ON_CONFIG_ERROR
280# error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
281# else
282# undef wxUSE_CRASHREPORT
283# define wxUSE_CRASHREPORT 0
284# endif
285#endif /* wxUSE_CRASHREPORT */
286
ca5c6ac3 287#if !wxUSE_VARIANT
a1f48575
VZ
288# if wxUSE_ACTIVEX
289# ifdef wxABORT_ON_CONFIG_ERROR
290# error "wxActiveXContainer requires wxVariant"
291# else
292# undef wxUSE_ACTIVEX
293# define wxUSE_ACTIVEX 0
294# endif
295# endif
296
ca5c6ac3
VZ
297# if wxUSE_OLE_AUTOMATION
298# ifdef wxABORT_ON_CONFIG_ERROR
299# error "wxAutomationObject requires wxVariant"
300# else
301# undef wxUSE_OLE_AUTOMATION
302# define wxUSE_OLE_AUTOMATION 0
303# endif
304# endif
a1f48575 305#endif /* !wxUSE_VARIANT */
ca5c6ac3 306
b55c3716
VZ
307#if !wxUSE_DYNAMIC_LOADER
308# if wxUSE_MS_HTML_HELP
309# ifdef wxABORT_ON_CONFIG_ERROR
310# error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
311# else
63de3718 312# undef wxUSE_MS_HTML_HELP
285ba64d 313# define wxUSE_MS_HTML_HELP 0
b55c3716
VZ
314# endif
315# endif
316# if wxUSE_DIALUP_MANAGER
317# ifdef wxABORT_ON_CONFIG_ERROR
318# error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
319# else
6fbc7b59 320# undef wxUSE_DIALUP_MANAGER
285ba64d 321# define wxUSE_DIALUP_MANAGER 0
b55c3716
VZ
322# endif
323# endif
a1f48575 324#endif /* !wxUSE_DYNAMIC_LOADER */
b55c3716 325
64c288fa 326#if !wxUSE_DYNLIB_CLASS
e71508e1
VZ
327# if wxUSE_DC_TRANSFORM_MATRIX
328# ifdef wxABORT_ON_CONFIG_ERROR
329# error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_DYNLIB_CLASS"
330# else
331# undef wxUSE_DC_TRANSFORM_MATRIX
332# define wxUSE_DC_TRANSFORM_MATRIX 0
333# endif
334# endif
64c288fa
JS
335# if wxUSE_UXTHEME
336# ifdef wxABORT_ON_CONFIG_ERROR
337# error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
338# else
339# undef wxUSE_UXTHEME
340# define wxUSE_UXTHEME 0
341# endif
342# endif
343# if wxUSE_MEDIACTRL
344# ifdef wxABORT_ON_CONFIG_ERROR
345# error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS"
346# else
347# undef wxUSE_MEDIACTRL
348# define wxUSE_MEDIACTRL 0
349# endif
350# endif
8ef51d67
JS
351# if wxUSE_INKEDIT
352# ifdef wxABORT_ON_CONFIG_ERROR
353# error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS"
354# else
355# undef wxUSE_INKEDIT
356# define wxUSE_INKEDIT 0
357# endif
358# endif
a1f48575 359#endif /* !wxUSE_DYNLIB_CLASS */
64c288fa 360
42ef5bda 361#if !wxUSE_OLE
a1f48575
VZ
362# if wxUSE_ACTIVEX
363# ifdef wxABORT_ON_CONFIG_ERROR
364# error "wxActiveXContainer requires wxUSE_OLE"
365# else
366# undef wxUSE_ACTIVEX
367# define wxUSE_ACTIVEX 0
368# endif
369# endif
370
42ef5bda
VZ
371# if wxUSE_DATAOBJ
372# ifdef wxABORT_ON_CONFIG_ERROR
373# error "wxUSE_DATAOBJ requires wxUSE_OLE"
374# else
375# undef wxUSE_DATAOBJ
376# define wxUSE_DATAOBJ 0
377# endif
378# endif
ca5c6ac3
VZ
379
380# if wxUSE_OLE_AUTOMATION
381# ifdef wxABORT_ON_CONFIG_ERROR
382# error "wxAutomationObject requires wxUSE_OLE"
383# else
384# undef wxUSE_OLE_AUTOMATION
385# define wxUSE_OLE_AUTOMATION 0
386# endif
387# endif
a1f48575
VZ
388#endif /* !wxUSE_OLE */
389
390#if !wxUSE_ACTIVEX
391# if wxUSE_MEDIACTRL
392# ifdef wxABORT_ON_CONFIG_ERROR
393# error "wxMediaCtl requires wxActiveXContainer"
394# else
395# undef wxUSE_MEDIACTRL
396# define wxUSE_MEDIACTRL 0
397# endif
398# endif
2724d84b
SL
399# if wxUSE_WEB
400# ifdef wxABORT_ON_CONFIG_ERROR
401# error "wxWebView requires wxActiveXContainer under MSW"
402# else
403# undef wxUSE_WEB
404# define wxUSE_WEB 0
405# endif
406# endif
a1f48575 407#endif /* !wxUSE_ACTIVEX */
42ef5bda 408
e7678d7d
VZ
409#if !wxUSE_THREADS
410# if wxUSE_FSWATCHER
411# ifdef wxABORT_ON_CONFIG_ERROR
412# error "wxFileSystemWatcher requires wxThread under MSW"
413# else
414# undef wxUSE_FSWATCHER
415# define wxUSE_FSWATCHER 0
416# endif
af9b2033 417# endif
e7678d7d
VZ
418#endif /* !wxUSE_THREADS */
419
2724d84b
SL
420
421#if !wxUSE_OLE_AUTOMATION
422# if wxUSE_WEB
423# ifdef wxABORT_ON_CONFIG_ERROR
424# error "wxWebView requires wxUSE_OLE_AUTOMATION under MSW"
425# else
426# undef wxUSE_WEB
427# define wxUSE_WEB 0
428# endif
429# endif
430#endif /* !wxUSE_OLE_AUTOMATION */
431
07b1232d
VZ
432#if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
433# undef wxUSE_POSTSCRIPT
434# define wxUSE_POSTSCRIPT 1
435#endif
436
5e7f00a1 437#endif /* _WX_MSW_CHKCONF_H_ */