SetMetaRgn

  int SetMetaRgn(hdc)    
  HDC hdc; /* handle of device context */

The SetMetaRgn function intersects the current clip-region for the specified device context with the current meta region and saves the combined region as the new meta region for the specified device context. The clip region is reset to a null region.

Parameters

hdc

Identifies the device context.

Return Value

The return value specifies the new clipping region's complexity. It can be any one of the following values:

Value Meaning

NULLREGION Region is empty.
SIMPLEREGION Region is a single rectangle.
COMPLEXREGION Region is more than a single rectangle.
ERROR Error occurred. The previous clipping region is unaffected.

Comments

The current clipping of a device context is defined by the intersection of its clip region and its meta region.

The SetMetaRgn function should only be called after an application's original device context was saved by calling the SaveDC function.

See Also

GetMetaRgn