X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2cce0c4572a9c22c225a402d0d872f98d2e9293..7cc98b3e3fbe91688e1ff8852a03e589aec5c866:/src/msw/ole/automtn.cpp diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index f72ecea359..934efa6354 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -21,17 +21,16 @@ #endif #include "wx/log.h" -#include "wx/msw/ole/automtn.h" -#include -#include -#include #include #include -#ifdef GetObject -#undef GetObject -#endif +#include "wx/msw/ole/automtn.h" + +#include "wx/msw/private.h" + +#include +#include // wrapper around BSTR type (by Vadim Zeitlin) @@ -539,7 +538,8 @@ bool ConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) else if (type == "bool") { oleVariant.vt = VT_BOOL; -#ifdef __WATCOMC__ + // 'bool' required for VC++ 4 apparently +#if defined(__WATCOMC__) || (defined(__VISUALC__) && (__VISUALC__ <= 1000)) oleVariant.bool = variant.GetBool(); #else oleVariant.boolVal = variant.GetBool(); @@ -667,8 +667,12 @@ bool ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) case VT_BOOL: { -#ifdef __WATCOMC__ +#if defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER <= 1000)) //GC +#ifndef HAVE_BOOL // Can't use bool operator if no native bool type + variant = (long) (oleVariant.bool != 0); +#else variant = (bool) (oleVariant.bool != 0); +#endif #else variant = (bool) (oleVariant.boolVal != 0); #endif