From 0c589ad076cb531a3ef7808aaedadc03c8286942 Mon Sep 17 00:00:00 2001 From: Brian Macy Date: Sat, 5 Jun 1999 05:00:23 +0000 Subject: [PATCH] Attempt at getting mingw32 working again... still doesn't work I wonder when the last time it did work git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/private.h | 2 +- include/wx/msw/treectrl.h | 10 ---------- include/wx/msw/winundef.h | 14 +++++++++----- src/common/dcbase.cpp | 3 ++- src/common/log.cpp | 2 ++ src/common/resource.cpp | 1 + src/makeg95.env | 2 +- src/msw/caret.cpp | 1 + src/msw/clipbrd.cpp | 1 + src/msw/cursor.cpp | 1 + src/msw/dc.cpp | 6 ++++-- src/msw/dcclient.cpp | 5 ++++- src/msw/dcprint.cpp | 7 ++++--- src/msw/dcscreen.cpp | 4 +++- src/msw/dialog.cpp | 2 ++ src/msw/imaglist.cpp | 4 +++- src/msw/joystick.cpp | 4 +++- src/msw/listbox.cpp | 28 ++++++++++++++-------------- src/msw/mdi.cpp | 2 ++ src/msw/menu.cpp | 1 + src/msw/menuitem.cpp | 5 ++++- src/msw/minifram.cpp | 8 +++++--- src/msw/ownerdrw.cpp | 3 ++- src/msw/printwin.cpp | 3 +++ src/msw/region.cpp | 1 + src/msw/statbmp.cpp | 5 ++++- src/msw/statbox.cpp | 6 ++++-- src/msw/timer.cpp | 4 +++- src/msw/treectrl.cpp | 15 ++++++++++++--- src/msw/utils.cpp | 2 +- src/msw/window.cpp | 8 +++++--- 31 files changed, 103 insertions(+), 57 deletions(-) diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index e960fad880..2171b17c59 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -54,7 +54,7 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; // this defines a CASTWNDPROC macro which casts a pointer to the type of a // window proc // --------------------------------------------------------------------------- -#ifdef __GNUWIN32__ +#if defined(__GNUWIN32__) && !defined(__MINGW32__) # define CASTWNDPROC (long unsigned) #else # ifdef __BORLANDC__ diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 429aa6983e..97baa3f6a4 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -23,16 +23,6 @@ #include "wx/event.h" #include "wx/textctrl.h" -#ifdef __GNUWIN32__ -# ifdef GetFirstChild -# undef GetFirstChild -# endif - -# ifdef GetNextSibling -# undef GetNextSibling -# endif -#endif - // the type for "untyped" data typedef long wxDataType; diff --git a/include/wx/msw/winundef.h b/include/wx/msw/winundef.h index c8a389bc89..3d657f4c21 100644 --- a/include/wx/msw/winundef.h +++ b/include/wx/msw/winundef.h @@ -117,6 +117,10 @@ #ifdef StartDoc #undef StartDoc + #ifdef __MINGW32__ + #define DOCINFOW DOCINFO + #define DOCINFOA DOCINFO + #endif #ifdef _UNICODE inline int StartDoc(HDC h, CONST DOCINFOW* info) { @@ -159,11 +163,11 @@ // GetNextSibling #ifdef GetNextSibling - #undef GetNextSibling - inline HWND GetNextSibling(HWND h) - { - return GetWindow(h, GW_HWNDNEXT); - } + #undef GetNextSibling + inline HWND GetNextSibling(HWND h) + { + return GetWindow(h, GW_HWNDNEXT); + } #endif // GetWindowProc diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 3ad130904a..114771cbb9 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -21,7 +21,8 @@ #endif #ifndef WX_PRECOMP -#include "wx/defs.h" + #include "wx/window.h" + #include "wx/msw/private.h" #endif #include "wx/dc.h" diff --git a/src/common/log.cpp b/src/common/log.cpp index 0c752c72a4..7c35005969 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -29,6 +29,8 @@ // wxWindows #ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/msw/private.h" #include #include #include diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 8c9d706d43..56b976b194 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -45,6 +45,7 @@ #include "wx/checkbox.h" #include "wx/settings.h" #include "wx/slider.h" +#include "wx/icon.h" #include "wx/statbox.h" #include "wx/statbmp.h" #if wxUSE_GAUGE diff --git a/src/makeg95.env b/src/makeg95.env index 67df3d0a74..8af9e36408 100644 --- a/src/makeg95.env +++ b/src/makeg95.env @@ -54,7 +54,7 @@ RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) ########################## Compiler flags ############################# # Miscellaneous compiler options -OPTIONS= -D__EGCS__ # -D__MINGW32__ +OPTIONS= -D__EGCS__ -DSTRICT # -D__MINGW32__ # Debugging information # AIX: comment out. diff --git a/src/msw/caret.cpp b/src/msw/caret.cpp index 9d72d6bae0..08bc7e5389 100644 --- a/src/msw/caret.cpp +++ b/src/msw/caret.cpp @@ -30,6 +30,7 @@ #ifndef WX_PRECOMP #include "wx/window.h" + #include "wx/log.h" #endif // WX_PRECOMP #include "wx/caret.h" diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 9220ab567f..36aa9b6b05 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -41,6 +41,7 @@ #include "wx/frame.h" #include "wx/bitmap.h" #include "wx/utils.h" + #include "wx/intl.h" #endif #if wxUSE_METAFILE diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index fdbcc955b8..8886f56b8c 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -27,6 +27,7 @@ #include "wx/utils.h" #include "wx/app.h" #include "wx/cursor.h" +#include "wx/icon.h" #endif #include "wx/msw/private.h" diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index ad8039c326..52726e5100 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -28,18 +28,20 @@ #pragma hdrstop #endif +#include "wx/frame.h" +#include "wx/msw/private.h" + #ifndef WX_PRECOMP - #include "wx/frame.h" #include "wx/dc.h" #include "wx/utils.h" #include "wx/dialog.h" #include "wx/app.h" #include "wx/bitmap.h" #include "wx/dcmemory.h" + #include "wx/log.h" #endif #include "wx/dcprint.h" -#include "wx/msw/private.h" #include #include diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 81dac38ce8..763e70bb57 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -28,11 +28,14 @@ #pragma hdrstop #endif -#include "wx/dcclient.h" +#include "wx/string.h" #include "wx/log.h" +#include "wx/window.h" #include "wx/msw/private.h" +#include "wx/dcclient.h" + // ---------------------------------------------------------------------------- // macros // ---------------------------------------------------------------------------- diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 95fe393b28..55eac864f7 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -23,11 +23,12 @@ #ifndef WX_PRECOMP #endif -#include "wx/dcprint.h" +#include "wx/string.h" #include "wx/log.h" -#include "math.h" - +#include "wx/window.h" #include "wx/msw/private.h" +#include "wx/dcprint.h" +#include "math.h" #if wxUSE_COMMON_DIALOGS #include diff --git a/src/msw/dcscreen.cpp b/src/msw/dcscreen.cpp index 7960fbd3e8..64c6908cfd 100644 --- a/src/msw/dcscreen.cpp +++ b/src/msw/dcscreen.cpp @@ -21,11 +21,13 @@ #endif #ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/window.h" + #include "wx/msw/private.h" #endif #include "wx/dcscreen.h" -#include #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index d1979b9a4e..e73db1485f 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -26,6 +26,8 @@ #include "wx/frame.h" #include "wx/app.h" #include "wx/settings.h" +#include "wx/intl.h" +#include "wx/log.h" #endif #include "wx/msw/private.h" diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp index 494ff86607..a4e2fe629d 100644 --- a/src/msw/imaglist.cpp +++ b/src/msw/imaglist.cpp @@ -26,7 +26,9 @@ #include #include "wx/setup.h" #include "wx/window.h" -#include "wx/dcclient.h" +#include "wx/icon.h" +#include "wx/dc.h" +#include "wx/string.h" #endif #include "wx/log.h" diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index 5fa69fd9ce..407e704130 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -20,7 +20,9 @@ #pragma hdrstop #endif -#include +#include "wx/string.h" +#include "wx/window.h" +#include "wx/msw/private.h" #ifndef __GNUWIN32__ #include diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 994f8e8f9b..b7cf16551a 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -20,18 +20,24 @@ #pragma hdrstop #endif +#include +#include "wx/window.h" +#include "wx/msw/private.h" + #ifndef WX_PRECOMP - #include "wx/listbox.h" - #include "wx/settings.h" - #include "wx/brush.h" - #include "wx/font.h" - #include "wx/dc.h" +#include "wx/listbox.h" +#include "wx/settings.h" +#include "wx/brush.h" +#include "wx/font.h" +#include "wx/dc.h" #endif -#include "wx/msw/private.h" +#include "wx/dynarray.h" +#include "wx/log.h" -#include -#include +#if wxUSE_OWNER_DRAWN + #include "wx/ownerdrw.h" +#endif #ifndef __TWIN32__ #ifdef __GNUWIN32__ @@ -39,12 +45,6 @@ #endif #endif -#if wxUSE_OWNER_DRAWN - #include "wx/ownerdrw.h" -#endif - -#include "wx/dynarray.h" -#include "wx/log.h" #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 950de37d67..8666721817 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -37,6 +37,8 @@ #include "wx/dialog.h" #include "wx/statusbr.h" #include "wx/settings.h" + #include "wx/intl.h" + #include "wx/log.h" #endif #include "wx/mdi.h" diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 58a835eacd..3fbfd1f1ca 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -32,6 +32,7 @@ #include "wx/frame.h" #include "wx/menu.h" #include "wx/utils.h" + #include "wx/intl.h" #endif #if wxUSE_OWNER_DRAWN diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index e039ec75d0..70f41fc246 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -29,11 +29,14 @@ #endif #ifndef WX_PRECOMP - #include "wx/menu.h" #include "wx/font.h" #include "wx/bitmap.h" #include "wx/settings.h" #include "wx/font.h" + #include "wx/accel.h" + #include "wx/menu.h" + #include "wx/string.h" + #include "wx/window.h" #endif #include "wx/ownerdrw.h" diff --git a/src/msw/minifram.cpp b/src/msw/minifram.cpp index 282ae2bbdd..83f8fa9558 100644 --- a/src/msw/minifram.cpp +++ b/src/msw/minifram.cpp @@ -20,6 +20,9 @@ #pragma hdrstop #endif +#include "wx/window.h" +#include "wx/msw/private.h" + #ifndef WX_PRECOMP #include "wx/setup.h" #include "wx/event.h" @@ -30,7 +33,6 @@ #if wxUSE_ITSY_BITSY #include "wx/minifram.h" -#include "wx/msw/private.h" #ifndef __TWIN32__ #ifdef __GNUWIN32__ @@ -86,8 +88,8 @@ wxMiniFrame::~wxMiniFrame(void) // ////////////////////////////////////////////////////////////////////////// -#include -#include +#include "wx/window.h" +#include "wx/msw/private.h" #include diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index 15dcd0d3f1..be1ce8d47e 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -21,6 +21,8 @@ #endif #ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/msw/private.h" #include "wx/font.h" #include "wx/bitmap.h" #include "wx/dcmemory.h" @@ -31,7 +33,6 @@ #include "wx/ownerdrw.h" #include "wx/menuitem.h" -#include "wx/msw/private.h" // ============================================================================ // implementation of wxOwnerDrawn class diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp index 758d8c74f0..d09ddc2dd9 100644 --- a/src/msw/printwin.cpp +++ b/src/msw/printwin.cpp @@ -31,10 +31,13 @@ #include "wx/defs.h" #ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/msw/private.h" #include "wx/utils.h" #include "wx/dc.h" #include "wx/app.h" #include "wx/msgdlg.h" + #include "wx/intl.h" #endif #include "wx/msw/printwin.h" diff --git a/src/msw/region.cpp b/src/msw/region.cpp index 128a6eb3b1..718ad9de56 100644 --- a/src/msw/region.cpp +++ b/src/msw/region.cpp @@ -23,6 +23,7 @@ #include "wx/msw/region.h" #include "wx/gdicmn.h" +#include "wx/window.h" #include "wx/msw/private.h" #if !USE_SHARED_LIBRARY diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index 7c5c1397d6..8e693a39e9 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -28,12 +28,15 @@ #pragma hdrstop #endif +#include "wx/window.h" +#include "wx/msw/private.h" + #ifndef WX_PRECOMP + #include "wx/icon.h" #include "wx/statbmp.h" #endif #include -#include "wx/msw/private.h" // --------------------------------------------------------------------------- // macors diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index a82450f6b3..15d87f01bc 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -20,13 +20,15 @@ #pragma hdrstop #endif +#include "wx/window.h" +#include "wx/msw/private.h" + #ifndef WX_PRECOMP -#include "wx/dcclient.h" #include "wx/app.h" +#include "wx/dcclient.h" #endif #include "wx/statbox.h" -#include "wx/msw/private.h" #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) diff --git a/src/msw/timer.cpp b/src/msw/timer.cpp index 0842be5308..334fe2c99b 100644 --- a/src/msw/timer.cpp +++ b/src/msw/timer.cpp @@ -20,6 +20,9 @@ #pragma hdrstop #endif +#include "wx/window.h" +#include "wx/msw/private.h" + #ifndef WX_PRECOMP #include "wx/setup.h" #include "wx/list.h" @@ -31,7 +34,6 @@ #include "wx/log.h" #include "wx/timer.h" -#include "wx/msw/private.h" #include #include diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 07ff06e610..e61d985c06 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -27,8 +27,19 @@ #pragma hdrstop #endif +#include "wx/window.h" +#include "wx/msw/private.h" + #ifndef WX_PRECOMP - #include "wx/wx.h" + #include "wx/settings.h" +#endif + +// Mingw32 is a bit mental even though this is done in winundef +#ifdef GetFirstChild +#undef GetFirstChild +#endif +#ifdef GetNextSibling +#undef GetNextSibling #endif #if defined(__WIN95__) @@ -38,8 +49,6 @@ #include "wx/imaglist.h" #include "wx/msw/treectrl.h" -#include "wx/msw/private.h" - #ifdef __GNUWIN32__ #include "wx/msw/gnuwin32/extra.h" #endif diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 697de7232a..52a8f79891 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -645,7 +645,7 @@ char *wxGetUserHome (const wxString& user) if ((home = getenv("TMP")) != NULL || (home = getenv("TMPDIR")) != NULL || (home = getenv("TEMP")) != NULL) - return *home ? home : "\\"; + return *home ? home : (char*)"\\"; } if (Stricmp(tmp, WXSTRINGCAST user1) == 0) user1 = ""; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 422921686a..75fc25d84d 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -29,6 +29,9 @@ #endif #ifndef WX_PRECOMP + #include + #include "wx/msw/winundef.h" + #include "wx/accel.h" #include "wx/setup.h" #include "wx/menu.h" #include "wx/dc.h" @@ -58,6 +61,8 @@ #include "wx/menuitem.h" #include "wx/log.h" +#include "wx/msw/private.h" + #if wxUSE_TOOLTIPS #include "wx/tooltip.h" #endif @@ -69,7 +74,6 @@ #include "wx/intl.h" #include "wx/log.h" -#include "wx/msw/private.h" #include "wx/textctrl.h" @@ -94,8 +98,6 @@ #endif #endif -#include "wx/msw/winundef.h" - // --------------------------------------------------------------------------- // macros // --------------------------------------------------------------------------- -- 2.45.2