Creates a Windows region that is a snapshot of the associated class object's bitmap region.


#include "ltwrappr.h"

virtual HRGN LBitmapRgn::GetRgnHandle()


The Windows region handle used by the class object's bitmap region.


If you want to assign a region from one bitmap to another, you must use the LBitmapRgn::GetRgnHandle function to get region from the first bitmap; then use the LBitmapRgn::SetRgnHandle function to assign the region to the second bitmap.

You are responsible for deleting the Windows region to free memory when the region is no longer needed. To do so, use the Windows DeleteObject function. The following is a list of Windows functions that relate to Windows regions:

Function Action
CombineRgn creates a region by combining two regions.
CreateEllipticRgn creates an elliptical region.
CreateEllipticRgnIndirect creates and elliptical region.
CreatePolygonRgn creates a polygonal region.
CreatePolyPolygonRgn creates a region consisting of polygons.
CreateRectRgn creates a rectangular region.
CreateRectRgnIndirect creates a rectangular region using a RECT structure.
CreateRoundRectRgn creates a rectangular region with round corners.
DeleteObject deletes a Windows GDI object, such as a region.
EqualRgn compares two regions for equality.
FillRgn fills a region with the specified brush.
FrameRgn draws a border around a region.
GetRgnBox retrieves the bounding rectangle for a region.
InvertRgn inverts the colors in a region.
OffsetRgn moves a region by the specified offsets.
PaintRgn fills a region with the brush in the device context.
PtInRegion queries whether a point is in a region.
RectInRegion queries whether a rectangle overlaps a region.
SetRectRgn changes a region into a specified rectangle.

Required DLLs and Libraries


Win32, x64.

See Also




For an example, refer to LBitmapRgn::SetRgnPolygon.

Help Version 22.0.2023.2.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help