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.
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.
The return value is nonzero if the function is successful. Otherwise, it is zero.
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);
CreateBrushIndirect, CreateDIBPatternBrush, CreateHatchBrush, CreatePatternBrush, CreateSolidBrush, FillRgn