WinXDrawFilledArea


hElement = WinXDrawFilledArea (hWnd, hBrush, colBound, x, y)

Floodfills an area with a brush

Parameter Description
hWnd The handle to the window to draw on
hBrush The handle to the brush to draw with
colBound The colour of the boundary of the area to fill
x, y The point at which to start filling

Returns

The id of the floodfill or -1 on fail

Remarks

If you register the onPaint callback, this function has no effect. This line will not be visible untill you call the WinXUpdate function. You can use the id returned by this function to undo the ellipse with the WinXUndo function.

This is the same as the floodfill tool in MS Paint.

Examples

'Create a brush
hBrush = CreateSolidBrush (0x000000FF)

'fill an area bounded by a red outline
WinXDrawFilledArea (hWnd, hBrush, 0x000000FF, 50, 50)

Related Links

WinXDrawFilledRect
WinXDrawFilledEllipse
onPaint (Callback)
WinXUpdate
WinXUndo