added wxUSE_NORLANDER_HEADERS for mingw32/gcc-2.95
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3258
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
34 files changed:
#if defined(__HPUX__) && defined(__GNUG__)
#define va_list __gnuc_va_list
#endif // HP-UX
#if defined(__HPUX__) && defined(__GNUG__)
#define va_list __gnuc_va_list
#endif // HP-UX
+
+// Mingw32 gcc-2.95 uses new windows headers which are more ms-like
+// we are setting this define because of the complex check
+// using NORLANDER as Cygwin may follow. (header author is Anders Norlander)
+#if defined(__MINGW32__) && (__GNUC__>=2) && (__GNUC_MINOR__>=95)
+# define wxUSE_NORLANDER_HEADERS 1
+#endif
+
//////////////////////////////////////////////////////////////////////////////////
// Currently Only MS-Windows/NT, XView and Motif are supported
//////////////////////////////////////////////////////////////////////////////////
// Currently Only MS-Windows/NT, XView and Motif are supported
// window proc
// ---------------------------------------------------------------------------
// window proc
// ---------------------------------------------------------------------------
-#if defined(__GNUWIN32__)
+#if defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)
# define CASTWNDPROC (long unsigned)
#else
# ifdef __BORLANDC__
# define CASTWNDPROC (long unsigned)
#else
# ifdef __BORLANDC__
-# if defined (__WIN32__) && defined(STRICT)
+# if defined (__WIN32__) && defined(STRICT)
typedef long (_stdcall * WndProcCast) (HWND, unsigned int, unsigned int, long);
# define CASTWNDPROC (WndProcCast)
# elif defined(__WIN16__)
typedef long (_stdcall * WndProcCast) (HWND, unsigned int, unsigned int, long);
# define CASTWNDPROC (WndProcCast)
# elif defined(__WIN16__)
bool Exists() const;
// get the info about key (any number of these pointers may be NULL)
bool Exists() const;
// get the info about key (any number of these pointers may be NULL)
+#if defined( __GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)
bool GetKeyInfo(size_t *pnSubKeys, // number of subkeys
size_t *pnMaxKeyLen, // max len of subkey name
size_t *pnValues, // number of values
bool GetKeyInfo(size_t *pnSubKeys, // number of subkeys
size_t *pnMaxKeyLen, // max len of subkey name
size_t *pnValues, // number of values
// wxLibraries (only one instance should normally exist)
// ---------------------------------------------------------------------------
// wxLibraries (only one instance should normally exist)
// ---------------------------------------------------------------------------
-wxLibraries::wxLibraries()
+wxLibraries::wxLibraries():m_loaded(wxKEY_STRING)
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxTipDialog, wxDialog)
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxTipDialog, wxDialog)
- EVT_BUTTON(wxID_NEXT_TIP, OnNextTip)
+ EVT_BUTTON(wxID_NEXT_TIP, wxTipDialog::OnNextTip)
END_EVENT_TABLE()
wxTipDialog::wxTipDialog(wxWindow *parent,
END_EVENT_TABLE()
wxTipDialog::wxTipDialog(wxWindow *parent,
#include <string.h>
#include <ctype.h>
#include <string.h>
#include <ctype.h>
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
#include <windows.h>
#include <windowsx.h>
#include <windows.h>
#include <windowsx.h>
+#if defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)
#include "wx/msw/gnuwin32/extra.h"
#endif
#include "wx/msw/gnuwin32/extra.h"
#endif
#include "wx/msw/private.h"
#include "wx/msw/private.h"
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
#endif
#ifndef __TWIN32__
#endif
#ifndef __TWIN32__
+#if defined (__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#include <math.h>
#if wxUSE_COMMON_DIALOGS
#include <math.h>
#if wxUSE_COMMON_DIALOGS
+#if wxUSE_NORLANDER_HEADERS
+ #include <windows.h>
+#endif
#include <commdlg.h>
#endif
#include <commdlg.h>
#endif
#include <ddeml.h>
#ifndef __TWIN32__
#include <ddeml.h>
#ifndef __TWIN32__
+#if !wxUSE_NORLANDER_HEADERS
#ifdef __GNUWIN32__
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#ifdef __GNUWIN32__
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#include "wx/msw/dib.h"
#ifndef __TWIN32__
#include "wx/msw/dib.h"
#ifndef __TWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
#ifdef __GNUWIN32__
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#ifdef __GNUWIN32__
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#ifndef SEEK_CUR
/* flags for _lseek */
#ifndef SEEK_CUR
/* flags for _lseek */
bmf.bfReserved1 = 0;
bmf.bfReserved2 = 0;
bmf.bfOffBits = sizeof(bmf) + (char FAR*)(DibPtr(lpbi)) - (char FAR*)lpbi;
bmf.bfReserved1 = 0;
bmf.bfReserved2 = 0;
bmf.bfOffBits = sizeof(bmf) + (char FAR*)(DibPtr(lpbi)) - (char FAR*)lpbi;
-#if defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__)
+#if defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__) || defined(wxUSE_NORLANDER_HEADERS)
if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 ||
_hwrite(fh, (LPCSTR)lpbi, size)<0) {
_lclose(fh);
if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 ||
_hwrite(fh, (LPCSTR)lpbi, size)<0) {
_lclose(fh);
#include "wx/msw/dragimag.h"
#include "wx/msw/private.h"
#include "wx/msw/dragimag.h"
#include "wx/msw/private.h"
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
#include "wx/msw/gauge95.h"
#include "wx/msw/private.h"
#include "wx/msw/gauge95.h"
#include "wx/msw/private.h"
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
#include "wx/msw/imaglist.h"
#include "wx/msw/private.h"
#include "wx/msw/imaglist.h"
#include "wx/msw/private.h"
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
#include "wx/window.h"
#include "wx/msw/private.h"
#include "wx/window.h"
#include "wx/msw/private.h"
+#if !defined( __GNUWIN32__ ) || defined(wxUSE_NORLANDER_HEADERS)
#include <mmsystem.h>
#endif
#include <mmsystem.h>
#endif
#ifndef __TWIN32__
#ifdef __GNUWIN32__
#ifndef __TWIN32__
#ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
#include <wx/msw/gnuwin32/extra.h>
#endif
#endif
#include <wx/msw/gnuwin32/extra.h>
#endif
#endif
// Why doesn't BC++ have joyGetPosEx?
#if !defined(__WIN32__) || defined(__BORLANDC__) || defined(__TWIN32__)
// Why doesn't BC++ have joyGetPosEx?
#if !defined(__WIN32__) || defined(__BORLANDC__) || defined(__TWIN32__)
#ifndef __TWIN32__
#if defined(__GNUWIN32__)
#ifndef __TWIN32__
#if defined(__GNUWIN32__)
- #include <wx/msw/gnuwin32/extra.h>
+ #ifndef wxUSE_NORLANDER_HEADERS
+ #include <wx/msw/gnuwin32/extra.h>
+ #endif
#include "wx/msw/private.h"
#include "wx/msw/private.h"
+#if defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)
#include "wx/msw/gnuwin32/extra.h"
#else
#include <commctrl.h>
#include "wx/msw/gnuwin32/extra.h"
#else
#include <commctrl.h>
#ifndef __TWIN32__
#ifdef __GNUWIN32__
#ifndef __TWIN32__
#ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxMiniFrame, wxFrame)
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxMiniFrame, wxFrame)
#ifndef __TWIN32__
#ifdef __GNUWIN32__
#ifndef __TWIN32__
#ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
-#if !defined(__GNUWIN32__) || defined(__TWIN32__)
+#if !defined(__GNUWIN32__) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
+#if defined( __GNUWIN32__ ) && !defined(wxUSE_NORLANDER_HEADERS)
bool wxRegKey::GetKeyInfo(size_t* pnSubKeys,
size_t* pnMaxKeyLen,
size_t* pnValues,
bool wxRegKey::GetKeyInfo(size_t* pnSubKeys,
size_t* pnMaxKeyLen,
size_t* pnValues,
#include "wx/msw/slider95.h"
#include "wx/msw/private.h"
#include "wx/msw/slider95.h"
#include "wx/msw/private.h"
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
#include "wx/spinbutt.h"
#include "wx/msw/private.h"
#include "wx/spinbutt.h"
#include "wx/msw/private.h"
-#if !defined(__GNUWIN32__) || defined(__TWIN32__)
+#if !defined(__GNUWIN32__) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
#include "wx/msw/private.h"
#include <windowsx.h>
#include "wx/msw/private.h"
#include <windowsx.h>
-#if !defined(__GNUWIN32__) || defined(__TWIN32__)
+#if !defined(__GNUWIN32__) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#ifndef __TWIN32__
#ifdef __GNUWIN32__
#include <commctrl.h>
#endif
#ifndef __TWIN32__
#ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#include "wx/msw/dib.h"
#include "wx/msw/tabctrl.h"
#include "wx/msw/dib.h"
#include "wx/msw/tabctrl.h"
#ifndef __TWIN32__
#ifdef __GNUWIN32__
#ifndef __TWIN32__
#ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
#include <wx/msw/gnuwin32/extra.h>
#endif
#endif
#include <wx/msw/gnuwin32/extra.h>
#endif
#endif
#ifdef __SALFORDC__
#include <shellapi.h>
#ifdef __SALFORDC__
#include <shellapi.h>
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#ifndef __TWIN32__
#ifdef __GNUWIN32__
#include <commctrl.h>
#endif
#ifndef __TWIN32__
#ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#include "wx/msw/dib.h"
#include "wx/tbar95.h"
#include "wx/msw/dib.h"
#include "wx/tbar95.h"
# include <fstream>
#endif
# include <fstream>
#endif
-#if wxUSE_RICHEDIT && !defined(__GNUWIN32__)
+#if wxUSE_RICHEDIT && (!defined(__GNUWIN32__) || defined(wxUSE_NORLANDER_HEADERS))
#include <richedit.h>
#endif
#include <richedit.h>
#endif
#include "wx/tooltip.h"
#include "wx/msw/private.h"
#include "wx/tooltip.h"
#include "wx/msw/private.h"
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
wxToolInfo(wxWindow *win)
{
// initialize all members
wxToolInfo(wxWindow *win)
{
// initialize all members
+#if defined( __GNUWIN32__ ) && !defined(wxUSE_NORLANDER_HEADERS)
memset(this, 0, sizeof(TOOLINFO));
#else
::ZeroMemory(this, sizeof(TOOLINFO));
memset(this, 0, sizeof(TOOLINFO));
#else
::ZeroMemory(this, sizeof(TOOLINFO));
#include "wx/treectrl.h"
#ifdef __GNUWIN32__
#include "wx/treectrl.h"
#ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
#include "wx/msw/gnuwin32/extra.h"
#endif
#include "wx/msw/gnuwin32/extra.h"
#endif
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#include <commctrl.h>
#endif
if ( m_windowStyle & wxTR_LINES_AT_ROOT )
wstyle |= TVS_LINESATROOT;
if ( m_windowStyle & wxTR_LINES_AT_ROOT )
wstyle |= TVS_LINESATROOT;
+#if !defined( __GNUWIN32__ ) && !defined(wxUSE_NORLANDER_HEADERS)
// we emulate the multiple selection tree controls by using checkboxes: set
// up the image list we need for this if we do have multiple selections
if ( m_windowStyle & wxTR_MULTIPLE )
// we emulate the multiple selection tree controls by using checkboxes: set
// up the image list we need for this if we do have multiple selections
if ( m_windowStyle & wxTR_MULTIPLE )
#include <windows.h>
#include <windowsx.h>
#include <windows.h>
#include <windowsx.h>
+#if !defined( __GNUWIN32__ ) || defined(wxUSE_NORLANDER_HEADERS)
#include <mmsystem.h>
#endif
#ifndef __TWIN32__
#ifdef __GNUWIN32__
#include <mmsystem.h>
#endif
#ifndef __TWIN32__
#ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
#include "wx/msw/gnuwin32/extra.h"
#endif
#endif
wxWave::wxWave()
: m_waveData(NULL), m_waveLength(0), m_isResource(FALSE)
wxWave::wxWave()
: m_waveData(NULL), m_waveLength(0), m_isResource(FALSE)
+#if !defined(__GNUWIN32__)|| defined(wxUSE_NORLANDER_HEADERS)
#include <shellapi.h>
#include <mmsystem.h>
#endif
#include <shellapi.h>
#include <mmsystem.h>
#endif
#include <windowsx.h>
#endif
#include <windowsx.h>
#endif
-#if ( defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__ )
+#if ( defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__ ) || defined(wxUSE_NORLANDER_HEADERS)
#include <commctrl.h>
#endif
#ifndef __TWIN32__
#ifdef __GNUWIN32__
#include <commctrl.h>
#endif
#ifndef __TWIN32__
#ifdef __GNUWIN32__
- #include <wx/msw/gnuwin32/extra.h>
+ #ifndef wxUSE_NORLANDER_HEADERS
+ #include <wx/msw/gnuwin32/extra.h>
+ #endif
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
TARGET=test
OBJECTS = $(TARGET).o wxtree.o
TARGET=test
OBJECTS = $(TARGET).o wxtree.o