GetMetaRgn

The GetMetaRgn function retrieves the current metaregion for the specified device context.

int GetMetaRgn(
  HDC hdc,    // handle of device context
  HRGN hrgn   // handle of region
);
 

Parameters

hdc
Handle to the device context.
hrgn
Handle to an existing region before the function is called. After the function returns, this parameter is a handle to a copy of the current metaregion.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Windows NT: To get extended error information, call GetLastError.

Remarks

If the function succeeds, hrgn is a handle to a copy of the current metaregion. Subsequent changes to this copy will not affect the current metaregion.

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

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Clipping Overview, Clipping Functions, SetMetaRgn