From e58989615283771efcaa9e798568772ef5fcfb0c Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Fri, 18 Jul 2003 19:47:19 +0000 Subject: [PATCH] MSVC 5 compilation fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/afterstd.h | 16 +++++++++++++++- include/wx/beforestd.h | 16 +++++++++++++++- include/wx/cmdproc.h | 1 + include/wx/msw/missing.h | 28 ++++++++++++++++++++++++++++ src/msw/app.cpp | 3 ++- src/msw/tbar95.cpp | 2 ++ 6 files changed, 63 insertions(+), 3 deletions(-) diff --git a/include/wx/afterstd.h b/include/wx/afterstd.h index a840f06f81..c74886ae82 100644 --- a/include/wx/afterstd.h +++ b/include/wx/afterstd.h @@ -17,6 +17,20 @@ #include "wx/msw/winundef.h" #endif #ifdef _MSC_VER -# pragma warning(pop) + // MSVC 5 does not have this + #if _MSC_VER > 1100 + #pragma warning(pop) + #else + // 'expression' : signed/unsigned mismatch + #pragma warning(default:4018) + + // 'conversion' : conversion from 'type1' to 'type2', + // possible loss of data + #pragma warning(default:4244) + + // C++ language change: to explicitly specialize class template + // 'identifier' use the following syntax + #pragma warning(default:4663) + #endif #endif diff --git a/include/wx/beforestd.h b/include/wx/beforestd.h index abf6b791e2..89e8f7f6e1 100644 --- a/include/wx/beforestd.h +++ b/include/wx/beforestd.h @@ -34,5 +34,19 @@ // 'id': identifier was truncated to 'num' characters in the debug info #pragma warning(disable:4786) - #pragma warning(push, 1) + // MSVC 5 does not have this + #if _MSC_VER > 1100 + #pragma warning(push, 1) + #else + // 'expression' : signed/unsigned mismatch + #pragma warning(disable:4018) + + // 'conversion' : conversion from 'type1' to 'type2', + // possible loss of data + #pragma warning(disable:4244) + + // C++ language change: to explicitly specialize class template + // 'identifier' use the following syntax + #pragma warning(disable:4663) + #endif #endif diff --git a/include/wx/cmdproc.h b/include/wx/cmdproc.h index 970922d40b..9baf2338c2 100644 --- a/include/wx/cmdproc.h +++ b/include/wx/cmdproc.h @@ -16,6 +16,7 @@ #pragma interface "cmdproc.h" #endif +#include "wx/defs.h" #include "wx/object.h" #include "wx/list.h" diff --git a/include/wx/msw/missing.h b/include/wx/msw/missing.h index 83129ec448..5778f1adf4 100644 --- a/include/wx/msw/missing.h +++ b/include/wx/msw/missing.h @@ -365,6 +365,34 @@ typedef struct _paraformat2 { #endif // wxUSE_RICHEDIT +// ---------------------------------------------------------------------------- +// ToolBar +// ---------------------------------------------------------------------------- + +#if wxUSE_TOOLBAR + +#if !defined(TBIF_SIZE) + +#define TBIF_SIZE 64 +#define TB_SETBUTTONINFO (WM_USER+66) + +typedef struct { + UINT cbSize; + DWORD dwMask; + int idCommand; + int iImage; + BYTE fsState; + BYTE fsStyle; + WORD cx; + DWORD lParam; + LPTSTR pszText; + int cchText; +} TBBUTTONINFO, *LPTBBUTTONINFO; + +#endif // !defined(TBIF_SIZE) + +#endif // wxUSE_TOOLBAR + // ---------------------------------------------------------------------------- // Misc stuff // ---------------------------------------------------------------------------- diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 03551b3c17..26e39644e4 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -111,7 +111,8 @@ #if _WIN32_IE >= 0x0300 && \ (!defined(__MINGW32__) || wxCHECK_W32API_VERSION( 2, 0 )) && \ - !defined(__CYGWIN__) && !defined(__WXWINCE__) + !defined(__CYGWIN__) && !defined(__WXWINCE__) && \ + (!defined(_MSC_VER) || (_MSC_VER > 1100)) #include #endif diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 4fa970dc54..a1d6e9d484 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -55,6 +55,8 @@ #include "wx/msw/gnuwin32/extra.h" #endif +#include "wx/msw/missing.h" + #include "wx/app.h" // for GetComCtl32Version #if defined(__MWERKS__) && defined(__WXMSW__) -- 2.45.2