InvertRgn

The InvertRgn function inverts the colors in the specified region.

BOOL InvertRgn(
  HDC hdc,    // handle to device context
  HRGN hrgn   // handle to region to be inverted
);
 

Parameters

hdc
Handle to the device context.
hrgn
Handle to the region for which colors are inverted. The region's coordinates are presumed to be logical coordinates.

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

On monochrome screens, the InvertRgn function makes white pixels black and black pixels white. On color screens, this inversion is dependent on the type of technology used to generate the colors for the screen.

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

Regions Overview, Region Functions, FillRgn, PaintRgn