diff --git a/src/Draw/Draw_Window.cxx b/src/Draw/Draw_Window.cxx index f5be7e056f..2d9f799bed 100644 --- a/src/Draw/Draw_Window.cxx +++ b/src/Draw/Draw_Window.cxx @@ -1579,7 +1579,7 @@ void DrawWindow::InitBuffer() GetClientRect(win, &rc); if (myMemHbm) { BITMAP aBmp; - GetObject(myMemHbm, sizeof(BITMAP), &aBmp); + GetObjectW (myMemHbm, sizeof(BITMAP), &aBmp); if (rc.right-rc.left == aBmp.bmWidth && rc.bottom-rc.top == aBmp.bmHeight) return; DeleteObject(myMemHbm); } @@ -1789,7 +1789,7 @@ static Standard_Boolean SaveBitmap (HBITMAP theHBitmap, { // Get informations about the bitmap BITMAP aBitmap; - if (GetObject (theHBitmap, sizeof(BITMAP), (LPSTR )&aBitmap) == 0) + if (GetObjectW (theHBitmap, sizeof(BITMAP), &aBitmap) == 0) { return Standard_False; } diff --git a/src/XCAFDoc/XCAFDoc_Datum.hxx b/src/XCAFDoc/XCAFDoc_Datum.hxx index 11805395e4..097b67ab02 100644 --- a/src/XCAFDoc/XCAFDoc_Datum.hxx +++ b/src/XCAFDoc/XCAFDoc_Datum.hxx @@ -27,6 +27,10 @@ class TDF_Attribute; class TDF_RelocationTable; class XCAFDimTolObjects_DatumObject; +// resolve name collisions with WinAPI headers +#ifdef GetObject + #undef GetObject +#endif class XCAFDoc_Datum; DEFINE_STANDARD_HANDLE(XCAFDoc_Datum, TDF_Attribute) @@ -66,16 +70,8 @@ public: Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(XCAFDoc_Datum,TDF_Attribute) -protected: - - - - private: @@ -83,14 +79,6 @@ private: Handle(TCollection_HAsciiString) myDescription; Handle(TCollection_HAsciiString) myIdentification; - - }; - - - - - - #endif // _XCAFDoc_Datum_HeaderFile diff --git a/src/XCAFDoc/XCAFDoc_Dimension.hxx b/src/XCAFDoc/XCAFDoc_Dimension.hxx index d2308947f0..84503b2c23 100644 --- a/src/XCAFDoc/XCAFDoc_Dimension.hxx +++ b/src/XCAFDoc/XCAFDoc_Dimension.hxx @@ -26,6 +26,10 @@ class TDF_Attribute; class TDF_RelocationTable; class XCAFDimTolObjects_DimensionObject; +// resolve name collisions with WinAPI headers +#ifdef GetObject + #undef GetObject +#endif class XCAFDoc_Dimension; DEFINE_STANDARD_HANDLE(XCAFDoc_Dimension, TDF_Attribute) diff --git a/src/XCAFDoc/XCAFDoc_GeomTolerance.hxx b/src/XCAFDoc/XCAFDoc_GeomTolerance.hxx index 819d87399d..54eff0b9e9 100644 --- a/src/XCAFDoc/XCAFDoc_GeomTolerance.hxx +++ b/src/XCAFDoc/XCAFDoc_GeomTolerance.hxx @@ -26,6 +26,10 @@ class TDF_Attribute; class TDF_RelocationTable; class XCAFDimTolObjects_GeomToleranceObject; +// resolve name collisions with WinAPI headers +#ifdef GetObject + #undef GetObject +#endif class XCAFDoc_GeomTolerance; DEFINE_STANDARD_HANDLE(XCAFDoc_GeomTolerance, TDF_Attribute) diff --git a/src/XCAFDoc/XCAFDoc_View.hxx b/src/XCAFDoc/XCAFDoc_View.hxx index f48aad2234..45f4356565 100644 --- a/src/XCAFDoc/XCAFDoc_View.hxx +++ b/src/XCAFDoc/XCAFDoc_View.hxx @@ -26,6 +26,10 @@ class TDF_Attribute; class TDF_RelocationTable; class XCAFView_Object; +// resolve name collisions with WinAPI headers +#ifdef GetObject + #undef GetObject +#endif class XCAFDoc_View; DEFINE_STANDARD_HANDLE(XCAFDoc_View, TDF_Attribute)