CRgn::EqualRgn
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

CRgn::EqualRgn

Determines whether the given region is equivalent to the region stored in the CRgn object.

BOOL EqualRgn(
   CRgn* pRgn 
) const;

Parameters

pRgn
Identifies a region.

Return Value

Nonzero if the two regions are equivalent; otherwise 0.

Example

CRgn   rgnA, rgnB;

VERIFY(rgnA.CreateEllipticRgn(200, 100, 350, 250));
VERIFY(rgnB.CreateRectRgn( 0, 0, 50, 50 ));
VERIFY(rgnB.CopyRgn( &rgnA ));
int nOffsetResult = rgnB.OffsetRgn( -75, 75 );
ASSERT( nOffsetResult != ERROR || nOffsetResult != NULLREGION );
ASSERT( FALSE == rgnB.EqualRgn( &rgnA ) );

See Also

CRgn Overview | Class Members | Hierarchy Chart | EqualRgn

Show:
© 2016 Microsoft