X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5419957e5794f2d10f4e125f77b2c2e2cd222d6..8c73964939048d046c50ec0240d26d9c36a4e424:/src/msw/dc.cpp diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 9367a7d761..1df225556d 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -26,6 +26,8 @@ #include "wx/utils.h" #include "wx/dialog.h" #include "wx/app.h" +#include "wx/bitmap.h" +#include "wx/dcmemory.h" #endif #include "wx/dcprint.h" @@ -194,7 +196,11 @@ void wxDC::SetClippingRegion(const wxRegion& region) m_clipX2 = box.x + box.width; m_clipY2 = box.y + box.height; +#ifdef __WIN16__ + SelectClipRgn((HDC) m_hDC, (HRGN) region.GetHRGN()); +#else ExtSelectClipRgn((HDC) m_hDC, (HRGN) region.GetHRGN(), RGN_AND); +#endif } void wxDC::DoClipping(WXHDC dc) @@ -599,7 +605,13 @@ void wxDC::DrawEllipticArc(long x,long y,long w,long h,double sa,double ea) void wxDC::DrawIcon(const wxIcon& icon, long x, long y) { +#if defined(__WIN32__) && !defined(__SC__) + ::DrawIconEx((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), (HICON) icon.GetHICON(), + icon.GetWidth(), icon.GetHeight(), 0, 0, DI_NORMAL); +#else ::DrawIcon((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), (HICON) icon.GetHICON()); +#endif + CalcBoundingBox(x, y); CalcBoundingBox(x+icon.GetWidth(), y+icon.GetHeight()); } @@ -887,11 +899,14 @@ bool wxDC::StartDoc(const wxString& message) #endif #endif +#ifndef __WIN16__ if (ret <= 0) { DWORD lastError = GetLastError(); wxDebugMsg("wxDC::StartDoc failed with error: %d\n", lastError); } +#endif + return (ret > 0); }