Freigeben über


CRgn Class

Encapsulates a Windows graphics device interface (GDI) region.

class CRgn : public CGdiObject

Members

Public Constructors

Name

Description

CRgn::CRgn

Constructs a CRgn object.

Public Methods

Name

Description

CRgn::CombineRgn

Sets a CRgn object so that it is equivalent to the union of two specified CRgn objects.

CRgn::CopyRgn

Sets a CRgn object so that it is a copy of a specified CRgn object.

CRgn::CreateEllipticRgn

Initializes a CRgn object with an elliptical region.

CRgn::CreateEllipticRgnIndirect

Initializes a CRgn object with an elliptical region defined by a RECT structure.

CRgn::CreateFromData

Creates a region from the given region and transformation data.

CRgn::CreateFromPath

Creates a region from the path that is selected into the given device context.

CRgn::CreatePolygonRgn

Initializes a CRgn object with a polygonal region. The system closes the polygon automatically, if necessary, by drawing a line from the last vertex to the first.

CRgn::CreatePolyPolygonRgn

Initializes a CRgn object with a region consisting of a series of closed polygons. The polygons may be disjoint, or they may overlap.

CRgn::CreateRectRgn

Initializes a CRgn object with a rectangular region.

CRgn::CreateRectRgnIndirect

Initializes a CRgn object with a rectangular region defined by a RECT structure.

CRgn::CreateRoundRectRgn

Initializes a CRgn object with a rectangular region with rounded corners.

CRgn::EqualRgn

Checks two CRgn objects to determine whether they are equivalent.

CRgn::FromHandle

Returns a pointer to a CRgn object when given a handle to a Windows region.

CRgn::GetRegionData

Fills the specified buffer with data describing the given region.

CRgn::GetRgnBox

Retrieves the coordinates of the bounding rectangle of a CRgn object.

CRgn::OffsetRgn

Moves a CRgn object by the specified offsets.

CRgn::PtInRegion

Determines whether a specified point is in the region.

CRgn::RectInRegion

Determines whether any part of a specified rectangle is within the boundaries of the region.

CRgn::SetRectRgn

Sets the CRgn object to the specified rectangular region.

Public Operators

Name

Description

CRgn::operator HRGN

Returns the Windows handle contained in the CRgn object.

Remarks

A region is an elliptical or polygonal area within a window. To use regions, you use the member functions of class CRgn with the clipping functions defined as members of class CDC.

The member functions of CRgn create, alter, and retrieve information about the region object for which they are called.

For more information on using CRgn, see Graphic Objects.

Inheritance Hierarchy

CObject

CGdiObject

CRgn

Requirements

Header: afxwin.h

See Also

Reference

CWnd Class

Hierarchy Chart