From 5438a5665e35ee6286c5af73747873df9daed252 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2001 23:02:09 +0000 Subject: [PATCH] applied patch 439186 (mingw and VC5 fixes) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/treelay.h | 7 +++++++ include/wx/msw/gccpriv.h | 7 +++++++ include/wx/msw/private.h | 4 ++++ include/wx/wxprec.h | 4 ++++ src/common/mimecmn.cpp | 2 ++ src/generic/treelay.cpp | 2 ++ src/html/htmlpars.cpp | 2 ++ src/html/htmprint.cpp | 1 + src/msw/app.cpp | 3 ++- src/msw/dialup.cpp | 2 +- src/msw/helpchm.cpp | 8 ++++---- src/msw/slider95.cpp | 1 + src/msw/tbar95.cpp | 3 ++- src/msw/treectrl.cpp | 2 +- 14 files changed, 40 insertions(+), 8 deletions(-) diff --git a/include/wx/generic/treelay.h b/include/wx/generic/treelay.h index 92963b63db..b59e1488f8 100644 --- a/include/wx/generic/treelay.h +++ b/include/wx/generic/treelay.h @@ -16,6 +16,13 @@ #pragma interface "wxtree.h" #endif +#ifndef WX_PRECOMP +#include +class wxList; +class wxDC; +class wxMouseEvent; +#endif + #include class WXDLLEXPORT wxTreeLayout: public wxObject diff --git a/include/wx/msw/gccpriv.h b/include/wx/msw/gccpriv.h index 5fff4db826..9830ad99fd 100644 --- a/include/wx/msw/gccpriv.h +++ b/include/wx/msw/gccpriv.h @@ -3,6 +3,13 @@ #ifndef _WX_MSW_GCCPRIV_H_ #define _WX_MSW_GCCPRIV_H_ +#if defined( __MINGW32__ ) + #include <_mingw.h> + #if __MINGW32_MAJOR_VERSION >= 1 + #define HAVE_W32API_H + #endif +#endif + // check for MinGW/Cygwin w32api version ( releases >= 0.5, only ) #if defined( HAVE_W32API_H ) #include diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 20b4d94676..3193fa73c3 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -14,6 +14,10 @@ #ifndef _WX_PRIVATE_H_ #define _WX_PRIVATE_H_ +#ifndef STRICT + #define STRICT 1 +#endif + #include #ifdef __WXMICROWIN__ diff --git a/include/wx/wxprec.h b/include/wx/wxprec.h index 0bfccf8d0d..f8f2e432bc 100644 --- a/include/wx/wxprec.h +++ b/include/wx/wxprec.h @@ -33,6 +33,10 @@ // include standard Windows headers #if defined(__WXMSW__) && !wxUSE_MFC + #ifndef STRICT + #define STRICT 1 + #endif + #include #include "wx/msw/winundef.h" #endif diff --git a/src/common/mimecmn.cpp b/src/common/mimecmn.cpp index e28e6f9272..8a16ced893 100644 --- a/src/common/mimecmn.cpp +++ b/src/common/mimecmn.cpp @@ -34,6 +34,8 @@ #ifndef WX_PRECOMP #include "wx/module.h" #endif +// this one is needed for MSVC5 +#include "wx/module.h" #ifndef WX_PRECOMP #include "wx/string.h" diff --git a/src/generic/treelay.cpp b/src/generic/treelay.cpp index 44ab82d233..fa5db2ecea 100644 --- a/src/generic/treelay.cpp +++ b/src/generic/treelay.cpp @@ -21,6 +21,8 @@ #endif #ifndef WX_PRECOMP +#include "wx/dc.h" +#include "wx/event.h" #endif #if wxUSE_TREELAYOUT diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index 3153ef819d..612f74bbfe 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -219,7 +219,9 @@ wxHtmlEntitiesParser::wxHtmlEntitiesParser() wxHtmlEntitiesParser::~wxHtmlEntitiesParser() { +#if wxUSE_WCHAR_T && !wxUSE_UNICODE delete m_conv; +#endif } void wxHtmlEntitiesParser::SetEncoding(wxFontEncoding encoding) diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 4c6c3e688d..9b25e01dc6 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -25,6 +25,7 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/intl.h" + #include "wx/dc.h" #endif #if wxUSE_HTML && wxUSE_PRINTING_ARCHITECTURE && wxUSE_STREAMS diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 3adeae2cb4..7cfe66ae9e 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -115,7 +115,8 @@ #define _WIN32_IE 0x0200 #endif -#if _WIN32_IE >= 0x0300 +#if _WIN32_IE >= 0x0300 \ + && !( defined(__MINGW32__) && !wxCHECK_W32API_VERSION( 1, 0 ) ) #include #endif diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 8e01b68a87..5d94d8d8df 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -865,7 +865,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, if ( dwRet != 0 ) { wxLogError(_("Failed to %s dialup connection: %s"), - async ? _("initiate") : _("establish"), + wxString(async ? _("initiate") : _("establish")).c_str(), GetErrorString(dwRet).c_str()); // we should still call RasHangUp() if we got a non 0 connection diff --git a/src/msw/helpchm.cpp b/src/msw/helpchm.cpp index b730931d20..d8e5426f5a 100644 --- a/src/msw/helpchm.cpp +++ b/src/msw/helpchm.cpp @@ -185,8 +185,8 @@ bool wxCHMHelpController::DisplayContextPopup(int contextId) popup.idString = contextId ; GetCursorPos(& popup.pt); - popup.clrForeground = -1; - popup.clrBackground = -1; + popup.clrForeground = (COLORREF)-1; + popup.clrBackground = (COLORREF)-1; popup.rcMargins.top = popup.rcMargins.left = popup.rcMargins.right = popup.rcMargins.bottom = -1; popup.pszFont = NULL; popup.pszText = NULL; @@ -202,8 +202,8 @@ bool wxCHMHelpController::DisplayTextPopup(const wxString& text, const wxPoint& popup.hinst = (HINSTANCE) wxGetInstance(); popup.idString = 0 ; popup.pt.x = pos.x; popup.pt.y = pos.y; - popup.clrForeground = -1; - popup.clrBackground = -1; + popup.clrForeground = (COLORREF)-1; + popup.clrBackground = (COLORREF)-1; popup.rcMargins.top = popup.rcMargins.left = popup.rcMargins.right = popup.rcMargins.bottom = -1; popup.pszFont = NULL; popup.pszText = (const wxChar*) text; diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 640e15e407..bbfae8f866 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -25,6 +25,7 @@ #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/brush.h" +#include "wx/slider.h" #endif #ifdef __WIN95__ diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 4ffad79693..7d024387b6 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -856,7 +856,8 @@ void wxToolBar::SetRows(int nRows) wxSize wxToolBar::GetToolSize() const { // TB_GETBUTTONSIZE is supported from version 4.70 -#if defined(_WIN32_IE) && (_WIN32_IE >= 0x300 ) +#if defined(_WIN32_IE) && (_WIN32_IE >= 0x300 ) \ + && !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 1, 0 ) ) if ( wxTheApp->GetComCtl32Version() >= 470 ) { DWORD dw = ::SendMessage(GetHwnd(), TB_GETBUTTONSIZE, 0, 0); diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index b21c0ec0c0..18b888bb9b 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2138,7 +2138,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) } break; -#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 && !wxUSE_COMCTL32_SAFELY +#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 && !wxUSE_COMCTL32_SAFELY && !defined(__GNUWIN32__) case NM_CUSTOMDRAW: { LPNMTVCUSTOMDRAW lptvcd = (LPNMTVCUSTOMDRAW)lParam; -- 2.45.2