X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3b466481eac25cbef1d35aaf6ee9d94167a07b9..c16e5a9271ab576a76c8537b67e0f5e25f90bc67:/src/msw/region.cpp diff --git a/src/msw/region.cpp b/src/msw/region.cpp index 5e7fae2b07..56846e68dd 100644 --- a/src/msw/region.cpp +++ b/src/msw/region.cpp @@ -288,6 +288,14 @@ wxRegionContain wxRegion::Contains(const wxRect& rect) const return Contains(x, y, w, h); } +// Get internal region handle +WXHRGN wxRegion::GetHRGN() const +{ + if (!m_refData) + return (WXHRGN) 0; + return (WXHRGN) M_REGION; +} + /////////////////////////////////////////////////////////////////////////////// // // // wxRegionIterator // @@ -343,13 +351,13 @@ void wxRegionIterator::Reset(const wxRegion& region) m_rects = new wxRect[header->nCount]; - RECT* rect = (RECT*) (rgnData + sizeof(RGNDATAHEADER)) ; + RECT* rect = (RECT*) ((char*)rgnData + sizeof(RGNDATAHEADER)) ; size_t i; for (i = 0; i < header->nCount; i++) { m_rects[i] = wxRect(rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top); - rect += sizeof(RECT); + rect ++; // Advances pointer by sizeof(RECT) } m_numRects = header->nCount;