Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SetMetaRgn function

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

Syntax


int SetMetaRgn(
  _In_  HDC hdc
);

Parameters

hdc [in]

A handle to the device context.

Return value

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

Return codeDescription
NULLREGION

Region is empty.

SIMPLEREGION

Region is a single rectangle.

COMPLEXREGION

Region is more than one rectangle.

ERROR

An error occurred. (The previous clipping region is unaffected.)

 

Remarks

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

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

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Clipping Overview
Clipping Functions
GetMetaRgn
SaveDC

 

 

Community Additions

Show:
© 2014 Microsoft