Condividi tramite


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 ) );

Requirements

Header: afxwin.h

See Also

Concepts

CRgn Class

CRgn Members

Hierarchy Chart

EqualRgn