]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/setup0.h
cf2d01b6c580dc9ec49f6e85a2cb6c9a37b75da4
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/setup.h
3 // Purpose: Configuration for the library
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // define this to 0 when building wxBase library
22 // ----------------------------------------------------------------------------
23 // compatibility settings
24 // ----------------------------------------------------------------------------
26 // This setting determines the compatibility with 1.68 API:
27 // Level 0: no backward compatibility, all new features
28 // Level 1: some extra methods are defined for compatibility.
32 // Recommended setting: 0 (in fact the compatibility code is now very minimal
33 // so there is little advantage to setting it to 1.
34 #define WXWIN_COMPATIBILITY 0
36 // in wxMSW version 2.1.11 and earlier, wxIcon always derives from wxBitmap,
37 // but this is very dangerous because you can mistakenly pass an icon instead
38 // of a bitmap to a function taking "const wxBitmap&" - which will *not* work
39 // because an icon is not a valid bitmap
41 // Starting from 2.1.12, you have the choice under this backwards compatible
42 // behaviour (your code will still compile, but probably won't behave as
43 // expected!) and not deriving wxIcon class from wxBitmap, but providing a
44 // conversion ctor wxBitmap(const wxIcon&) instead.
46 // Recommended setting: 0
47 #define wxICON_IS_BITMAP 0
49 // ----------------------------------------------------------------------------
51 // ----------------------------------------------------------------------------
53 // Generic comment about debugging settings: they are very useful if you don't
54 // use any other memory leak detection tools such as Purify/BoundsChecker, but
55 // are probably redundant otherwise. Also, Visual C++ CRT has the same features
56 // as wxWindows memory debugging subsystem built in since version 5.0 and you
57 // may prefer to use it instead of built in memory debugging code because it is
58 // faster and more fool proof.
60 // Using VC++ CRT memory debugging is enabled by default in debug mode
61 // (__WXDEBUG__) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0)
62 // and if __NO_VC_CRTDBG__ is not defined.
64 // If 1, enables wxDebugContext, for writing error messages to file, etc. If
65 // __WXDEBUG__ is not defined, will still use normal memory operators. It's
66 // recommended to set this to 1, since you may well need to output an error log
67 // in a production version (or non-debugging beta).
71 // Recommended setting: 1 but see comment above
72 #define wxUSE_DEBUG_CONTEXT 1
74 // If 1, enables debugging versions of wxObject::new and wxObject::delete *IF*
75 // __WXDEBUG__ is also defined.
77 // WARNING: this code may not work with all architectures, especially if
78 // alignment is an issue. This switch is currently ignored for mingw / cygwin
82 // Recommended setting: 1 but see comment in the beginning of this section
83 #define wxUSE_MEMORY_TRACING 1
85 // In debug mode, cause new and delete to be redefined globally.
86 // If this causes problems (e.g. link errors), set this to 0.
87 // This switch is currently ignored for mingw / cygwin
91 // Recommended setting: 1 but see comment in the beginning of this section
92 #define wxUSE_GLOBAL_MEMORY_OPERATORS 1
94 // In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
95 // this causes problems (e.g. link errors), set this to 0. You may need to set
96 // this to 0 if using templates (at least for VC++). This switch is currently
97 // ignored for mingw / cygwin
101 // Recommended setting: 1 but see comment in the beginning of this section
102 #define wxUSE_DEBUG_NEW_ALWAYS 1
104 // wxHandleFatalExceptions() may be used to catch the program faults at run
105 // time and, instead of terminating the program with a usual GPF message box,
106 // call the user-defined wxApp::OnFatalException() function. If you set
107 // wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work.
109 // This setting is for Win32 only and can only be enabled if your compiler
110 // supports Win32 structured exception handling (currently only VC++ does)
114 // Recommended setting: 1 if your compiler supports it.
116 #define wxUSE_ON_FATAL_EXCEPTION 1
118 #define wxUSE_ON_FATAL_EXCEPTION 0
121 // ----------------------------------------------------------------------------
123 // ----------------------------------------------------------------------------
125 // Support for message/error logging. This includes wxLogXXX() functions and
126 // wxLog and derived classes. Don't set this to 0 unless you really know what
131 // Recommended setting: 1 (always)
134 // Support for multithreaded applications: if 1, compile in thread classes
135 // (thread.h) and make the library a bit more thread safe. Although thread
136 // support is quite stable by now, you may still consider recompiling the
137 // library without it if you have no use for it - this will result in a
138 // somewhat smaller and faster operation.
140 // This is ignored under Win16, threads are only supported under Win32.
144 // Recommended setting: 0 unless you do plan to develop MT applications
145 #define wxUSE_THREADS 1
147 // If enabled (1), compiles wxWindows streams classes
148 #define wxUSE_STREAMS 1
150 // Use standard C++ streams if 1. If 0, use wxWin streams implementation.
151 #define wxUSE_STD_IOSTREAM 0
153 // Use serialization (requires utils/serialize)
154 #define wxUSE_SERIAL 0
156 // ----------------------------------------------------------------------------
157 // non GUI features selection
158 // ----------------------------------------------------------------------------
160 // Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit
161 // integer which is implemented in terms of native 64 bit integers if any or
162 // uses emulation otherwise.
164 // This class is required by wxDateTime and so you should enable it if you want
165 // to use wxDateTime. For most modern platforms, it will use the native 64 bit
166 // integers in which case (almost) all of its functions are inline and it
167 // almost does not take any space, so there should be no reason to switch it
170 // Recommended setting: 1
171 #define wxUSE_LONGLONG 1
173 // Set wxUSE_TIMEDATE to 1 to compile the wxDateTime and related classes which
174 // allow to manipulate dates, times and time intervals. wxDateTime replaces the
175 // old wxTime and wxDate classes which are still provided for backwards
176 // compatibility (and implemented in terms of wxDateTime).
178 // Note that this class is relatively new and is still officially in alpha
179 // stage because some features are not yet (fully) implemented. It is already
180 // quite useful though and should only be disabled if you are aiming at
181 // absolutely minimal version of the library.
183 // Requires: wxUSE_LONGLONG
185 // Recommended setting: 1
186 #define wxUSE_TIMEDATE 1
188 // Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes
189 // which allow the application to store its settings in the persistent
190 // storage. Setting this to 1 will also enable on-demand creation of the
191 // global config object in wxApp.
193 // See also wxUSE_CONFIG_NATIVE below.
195 // Recommended setting: 1
196 #define wxUSE_CONFIG 1
198 // If wxUSE_CONFIG is 1, you may choose to use either the native config
199 // classes under Windows (using .INI files under Win16 and the registry under
200 // Win32) or the portable text file format used by the config classes under
203 // Default is 1 to use native classes. Note that you may still use
204 // wxFileConfig even if you set this to 1 - just the config object created by
205 // default for the applications needs will be a wxRegConfig or wxIniConfig and
208 // Recommended setting: 1
209 #define wxUSE_CONFIG_NATIVE 1
211 // If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows
212 // to connect/disconnect from the network and be notified whenever the dial-up
213 // network connection is established/terminated.
217 // Recommended setting: 1
218 #define wxUSE_DIALUP_MANAGER 1
220 // Compile in wxLibrary class for run-time DLL loading and function calling
222 // This setting is for Win32 only
226 // Recommended setting: 1
227 #define wxUSE_DYNLIB_CLASS 1
229 // Set to 1 to use socket classes
230 #define wxUSE_SOCKETS 1
232 // Set to 1 to enable virtual file systems
233 // (needed by wxHTML)
234 #define wxUSE_FILESYSTEM 1
235 #define wxUSE_FS_ZIP 1
236 #define wxUSE_FS_INET 1
238 // input stream for reading from zip archives
239 #define wxUSE_ZIPSTREAM 1
241 #define wxUSE_APPLE_IEEE 1
242 // if enabled, the float codec written by Apple
243 // will be used to write, in a portable way,
246 // use wxFile class - required by i18n code, wxConfig and others - recommended
249 // use wxTextFile class: requires wxFile, required by wxConfig
250 #define wxUSE_TEXTFILE 1
252 // i18n support: _() macro, wxLocale class. Requires wxFile
255 // ----------------------------------------------------------------------------
257 // ----------------------------------------------------------------------------
259 // wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar
260 // classes at all. Otherwise, use the native toolbar class unless
261 // wxUSE_TOOLBAR_NATIVE is 0. Additionally, the generic toolbar class which
262 // supports some features which might not be supported by the native wxToolBar
263 // class may be compiled in if wxUSE_TOOLBAR_SIMPLE is 1.
265 // Default is 1 for all settings.
267 // Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE and 0 for
268 // wxUSE_TOOLBAR_SIMPLE (the default is 1 mainly for backwards compatibility).
269 #define wxUSE_TOOLBAR 1
270 #define wxUSE_TOOLBAR_NATIVE 1
271 #define wxUSE_TOOLBAR_SIMPLE 1
273 // wxNotebook is a control with several "tabs" located on one of its sides. It
274 // may be used ot logically organise the data presented to the user instead of
275 // putting everything in one huge dialog. It replaces wxTabControl and related
276 // classes of wxWin 1.6x.
280 // Recommended setting: 1
281 #define wxUSE_NOTEBOOK 1
283 // The corresponding controls will be compiled in if wxUSE_<CONTROL> is set to
284 // 1 and not compiled into the library otherwise.
286 // Default is 1 for everything.
288 // Recommended setting: 1 (library might fail to compile for some combinations
289 // of disabled controls)
290 #define wxUSE_CARET 1
291 #define wxUSE_CHECKBOX 1
292 #define wxUSE_CHECKLISTBOX 1
293 #define wxUSE_CHOICE 1
294 #define wxUSE_COMBOBOX 1
295 #define wxUSE_GAUGE 1
296 #define wxUSE_LISTBOX 1
297 #define wxUSE_RADIOBOX 1
298 #define wxUSE_RADIOBTN 1
299 #define wxUSE_SASH 1 // wxSashWindow
300 #define wxUSE_SCROLLBAR 1
301 #define wxUSE_SLIDER 1
302 #define wxUSE_SPINBTN 1
303 #define wxUSE_SPINCTRL 1
304 #define wxUSE_STATLINE 1
305 #define wxUSE_STATUSBAR 1
306 #define wxUSE_TOOLTIPS 1 // wxToolTip and wxWindow::SetToolTip()
308 // Two status bar implementations are available under Win32: the generic one
309 // or the wrapper around native control. For native look and feel the native
310 // version should be used.
314 // Recommended setting: 1
315 #define wxUSE_NATIVE_STATUSBAR 1
317 // this setting is obsolete, value is ignored
318 #define wxUSE_BUTTONBAR 1
320 // wxGrid class comes in two flavours: the original (pre wxWin 2.2) one and
321 // the new, much imporved and enhanced version. The new version is backwards
322 // compatible with the old one and should be used whenever possible, i.e. if
323 // you set wxUSE_GRID to 1, set wxUSE_NEW_GRID to 1 too.
325 // Default is 1 for both options.
327 // Recommended setting: 1 for wxUSE_NEW_GRID, 0 if you have an old code using
328 // wxGrid and 100% backwards compatible (with all old wxGrid quirks) is
331 // WIN16/BC++ resets wxUSE_NEW_GRID to 0 because it exceeds the data limit.
333 #define wxUSE_NEW_GRID 1
335 // wxValidator class and related methods
336 #define wxUSE_VALIDATORS 1
338 // wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
339 #define wxUSE_ACCEL 1
341 // ----------------------------------------------------------------------------
343 // ----------------------------------------------------------------------------
345 // Define 1 to use generic dialogs in Windows, even though they duplicate
346 // native common dialog (e.g. wxColourDialog). This is mainly useful for
351 // Recommended setting: 0
352 #define wxUSE_GENERIC_DIALOGS_IN_MSW 0
354 // On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
355 // file selector, printer dialog). Switching this off also switches off the
356 // printing architecture and interactive wxPrinterDC.
360 // Recommended setting: 1 (unless it really doesn't work)
361 #define wxUSE_COMMON_DIALOGS 1
363 // text entry dialog and wxGetTextFromUser function
364 #define wxUSE_TEXTDLG 1
366 // progress dialog class for lengthy operations
367 #define wxUSE_PROGRESSDLG 1
369 // wxBusyInfo displays window with message when app is busy. Works in same way
371 #define wxUSE_BUSYINFO 1
373 // wxDirDlg class for getting a directory name from user
374 #define wxUSE_DIRDLG 1
376 // support for startup tips (wxShowTip &c)
377 #define wxUSE_STARTUP_TIPS 1
379 // ----------------------------------------------------------------------------
381 // ----------------------------------------------------------------------------
383 // Windows supports the graphics format known as metafile which is, though not
384 // portable, is widely used under Windows and so is supported by wxWin (under
385 // Windows only, of course). Win16 (Win3.1) used the so-called "Window
386 // MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in
387 // Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by
388 // default, WMFs will be used under Win16 and EMFs under Win32. This may be
389 // changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting
390 // wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile
391 // in any metafile related classes at all.
393 // Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS.
395 // Recommended setting: default or 0 for everything for portable programs.
396 #define wxUSE_METAFILE 1
397 #define wxUSE_ENH_METAFILE 1
398 #define wxUSE_WIN_METAFILES_ALWAYS 0
400 // ----------------------------------------------------------------------------
401 // Big GUI components
402 // ----------------------------------------------------------------------------
404 // Set to 0 to disable document/view architecture
405 #define wxUSE_DOC_VIEW_ARCHITECTURE 1
407 // Set to 0 to disable MDI document/view architecture
408 #define wxUSE_MDI_ARCHITECTURE 1
410 // Set to 0 to disable print/preview architecture code
411 #define wxUSE_PRINTING_ARCHITECTURE 1
413 // wxHTML sublibrary allows to display HTML in wxWindow programs and much,
418 // Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a
422 // wxPlot is a class to display functions plots in wxWindow.
426 // Recommended setting: 1
430 #define wxUSE_GLCANVAS 0
432 // wxTreeLayout class
433 #define wxUSE_TREELAYOUT 1
435 // ----------------------------------------------------------------------------
436 // miscellaneous settings
437 // ----------------------------------------------------------------------------
440 // 0 for no interprocess comms
441 // Note: wxHELP uses IPC under X so these are interdependent!
443 // 0 for no help facility
444 #define wxUSE_RESOURCES 1
445 // 0 for no wxGetResource/wxWriteResource
446 #define wxUSE_CONSTRAINTS 1
447 // 0 for no window layout constraint system
449 #define wxUSE_CLIPBOARD 1
450 // 0 for no clipboard functions
452 #define wxUSE_SPLINES 1
455 #define wxUSE_DRAG_AND_DROP 1
456 // 0 for no drag and drop
458 #define wxUSE_XPM_IN_MSW 1
459 // 0 for no XPM support in wxBitmap.
460 // Default is 1, as XPM is now fully
461 // supported this makes easier the issue
462 // of portable icons and bitmaps.
463 #define wxUSE_IMAGE_LOADING_IN_MSW 1
464 // Use dynamic DIB loading/saving code in utils/dib under MSW.
465 #define wxUSE_RESOURCE_LOADING_IN_MSW 1
466 // Use dynamic icon/cursor loading/saving code
468 #define wxUSE_WX_RESOURCES 1
469 // Use .wxr resource mechanism (requires PrologIO library)
471 // ----------------------------------------------------------------------------
472 // Postscript support settings
473 // ----------------------------------------------------------------------------
475 #define wxUSE_POSTSCRIPT 0
476 // 0 for no PostScript device context
477 #define wxUSE_AFM_FOR_POSTSCRIPT 0
478 // 1 to use font metric files in GetTextExtent
480 #define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
481 // Set to 0 to disable PostScript print/preview architecture code
482 // under Windows (just use Windows printing).
484 // ----------------------------------------------------------------------------
486 // ----------------------------------------------------------------------------
489 // Define 1 to use ODBC classes
491 #define wxODBC_FWD_ONLY_CURSORS 1
492 // For backward compatibility reasons, this parameter now only
493 // controls the default scrolling method used by cursors. This
494 // default behavior can be overriden by setting the second param
495 // of wxDB::GetDbConnection() to indicate whether the connection
496 // (and any wxTable()s that use the connection) should support
497 // forward only scrolling of cursors, or both forward and backward
498 // Support for backward scrolling cursors is dependent on the
499 // data source as well as the ODBC driver being used.
501 // ----------------------------------------------------------------------------
502 // other compiler (mis)features
503 // ----------------------------------------------------------------------------
505 // Set this to 0 if your compiler can't cope with omission of prototype
510 // Recommended setting: 1 (should never need to set this to 0)
511 #define REMOVE_UNUSED_ARG 1
513 // VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
514 // them. Set to 1 for <iostream.h>, 0 for <iostream>
518 // Recommended setting: whatever your compiler likes more
519 #define wxUSE_IOSTREAMH 1
521 // ----------------------------------------------------------------------------
522 // image format support
523 // ----------------------------------------------------------------------------
526 // Use zlib for compression in streams and PNG code
527 #define wxUSE_LIBPNG 1
528 // Use PNG bitmap/image code
529 #define wxUSE_LIBJPEG 1
530 // Use JPEG bitmap/image code
531 #define wxUSE_LIBTIFF 1
532 // Use TIFF bitmap/image code
534 // Use GIF bitmap/image code
536 // Use PNM bitmap/image code
538 // Use PCX bitmap/image code
540 // ----------------------------------------------------------------------------
541 // Windows-only settings
542 // ----------------------------------------------------------------------------
544 // Most of the settings in this section are obsolete or not used
546 // Make settings compatible with MFC
549 // required for drag-and-drop, clipboard, OLE Automation
552 #if defined(__WIN95__)
553 #define wxUSE_CTL3D 0
555 // Define 1 to use Microsoft CTL3D library.
556 // See note above about using FAFA and CTL3D.
557 #define wxUSE_CTL3D 1
560 // can we use RICHEDIT control?
561 #if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__GNUWIN32_OLD__)
562 #define wxUSE_RICHEDIT 1
564 #define wxUSE_RICHEDIT 0
567 #define wxUSE_ITSY_BITSY 1
568 // Define 1 to use Microsoft's ItsyBitsy
569 // small title bar library, for wxMiniFrame.
570 // This setting is only used for Win3.1;
571 // Win9x and NT use native miniframes
573 #define wxUSE_BITMAP_MESSAGE 1
574 // Define 1 to use bitmap messages.
575 #define wxUSE_PORTABLE_FONTS_IN_MSW 0
576 // Define 1 to use new portable font scheme in Windows
577 // (used by default under X)
578 #define wxFONT_SIZE_COMPATIBILITY 0
579 // Define 1 for font size to be backward compatible
580 // to 1.63 and earlier. 1.64 and later define point
581 // sizes to be compatible with Windows.
582 #define wxUSE_PENWINDOWS 0
583 // Set to 1 to use PenWindows
585 #define wxUSE_OWNER_DRAWN 1
586 // Owner-drawn menus and listboxes
588 #if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
589 #ifndef wxUSE_NORLANDER_HEADERS
590 # define wxUSE_NORLANDER_HEADERS 1
594 // ----------------------------------------------------------------------------
595 // disable the settings which don't work for some compilers
596 // ----------------------------------------------------------------------------
598 // These don't work as expected for mingw32 and cygwin32
599 #if defined(__GNUWIN32__)
600 #undef wxUSE_MEMORY_TRACING
601 #define wxUSE_MEMORY_TRACING 0
603 #undef wxUSE_GLOBAL_MEMORY_OPERATORS
604 #define wxUSE_GLOBAL_MEMORY_OPERATORS 0
606 #undef wxUSE_DEBUG_NEW_ALWAYS
607 #define wxUSE_DEBUG_NEW_ALWAYS 0
608 #endif // __GNUWIN32__
610 // MFC duplicates these operators
612 #undef wxUSE_GLOBAL_MEMORY_OPERATORS
613 #define wxUSE_GLOBAL_MEMORY_OPERATORS 0
615 #undef wxUSE_DEBUG_NEW_ALWAYS
616 #define wxUSE_DEBUG_NEW_ALWAYS 0
623 #if (!defined(WIN32) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
624 // Can't use OLE drag and drop in Windows 3.1 because we don't know how
625 // to implement UUIDs
626 // GnuWin32 doesn't have appropriate headers for e.g. IUnknown.
627 #undef wxUSE_DRAG_AND_DROP
628 #define wxUSE_DRAG_AND_DROP 0
631 // Only WIN32 supports wxStatusBar95
632 #if !defined(__WIN32__) && wxUSE_NATIVE_STATUSBAR
633 #undef wxUSE_NATIVE_STATUSBAR
634 #define wxUSE_NATIVE_STATUSBAR 0
637 // Salford C++ doesn't like some of the memory operator definitions
639 #undef wxUSE_MEMORY_TRACING
640 #define wxUSE_MEMORY_TRACING 0
642 #undef wxUSE_GLOBAL_MEMORY_OPERATORS
643 #define wxUSE_GLOBAL_MEMORY_OPERATORS 0
645 #undef wxUSE_DEBUG_NEW_ALWAYS
646 #define wxUSE_DEBUG_NEW_ALWAYS 0
649 #define wxUSE_THREADS 0
651 #undef wxUSE_OWNER_DRAWN
652 #define wxUSE_OWNER_DRAWN 0
658 #define wxUSE_THREADS 0
665 // BC++/Win16 can't cope with the amount of data in resource.cpp
666 #if defined(__WIN16__) && defined(__BORLANDC__)
667 #undef wxUSE_WX_RESOURCES
668 #define wxUSE_WX_RESOURCES 0
673 #undef wxUSE_NEW_GRID
674 #define wxUSE_NEW_GRID 0
677 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
678 // BC++ 4.0 can't compile JPEG library
680 #define wxUSE_LIBJPEG 0
683 #if defined(__WXMSW__) && defined(__WATCOMC__)
685 #define wxUSE_LIBJPEG 0
688 #define wxUSE_LIBTIFF 0
690 #undef wxUSE_GLCANVAS
691 #define wxUSE_GLCANVAS 0
694 #if defined(__WXMSW__) && !defined(__WIN32__)
697 #define wxUSE_SOCKETS 0
700 #define wxUSE_THREADS 0
702 #undef wxUSE_TOOLTIPS
703 #define wxUSE_TOOLTIPS 0
705 #undef wxUSE_SPINCTRL
706 #define wxUSE_SPINCTRL 0
709 #define wxUSE_SPINBTN 0
712 #define wxUSE_LIBPNG 0
715 #define wxUSE_LIBJPEG 0
718 #define wxUSE_LIBTIFF 0
729 #undef wxUSE_GLCANVAS
730 #define wxUSE_GLCANVAS 0