PaintRgn

2.x

  BOOL PaintRgn(hdc, hrgn)    
  HDC hdc; /* handle of device context */
  HRGN hrgn; /* handle of region, */  

The PaintRgn function fills a region by using the current brush for the given device context.

Parameters

hdc

Identifies the device context that contains the region to be filled.

hrgn

Identifies the region to be filled. The coordinates for the given region are specified in device units.

Return Value

The return value is nonzero if the function is successful. Otherwise, it is zero.

Example

The following example uses the current brush for a device context to fill an elliptical region:

HDC hdc;
HRGN hrgn;

hrgn = CreateEllipticRgn(10, 10, 110, 110);
SelectObject(hdc, hrgn);
PaintRgn(hdc, hrgn);

DeleteObject(hrgn);

See Also

CreateBrushIndirect, CreateDIBPatternBrush, CreateHatchBrush, CreatePatternBrush, CreateSolidBrush, FillRgn