X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c5dc04fd2f93ec42543b64743ea65abd7769000..c94ad3c365a7a2b12346258f3d6b26432f36fd8d:/src/msw/ole/automtn.cpp?ds=sidebyside diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 108c2948b0..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) @@ -540,7 +539,7 @@ bool ConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) { oleVariant.vt = VT_BOOL; // 'bool' required for VC++ 4 apparently -#if defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER <= 1000)) +#if defined(__WATCOMC__) || (defined(__VISUALC__) && (__VISUALC__ <= 1000)) oleVariant.bool = variant.GetBool(); #else oleVariant.boolVal = variant.GetBool(); @@ -668,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