Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FloodFill function

The FloodFill function fills an area of the display surface with the current brush. The area is assumed to be bounded as specified by the crFill parameter.

Note  The FloodFill function is included only for compatibility with 16-bit versions of Windows. Applications should use the ExtFloodFill function with FLOODFILLBORDER specified.
 

Syntax


BOOL FloodFill(
  _In_ HDC      hdc,
  _In_ int      nXStart,
  _In_ int      nYStart,
  _In_ COLORREF crFill
);

Parameters

hdc [in]

A handle to a device context.

nXStart [in]

The x-coordinate, in logical units, of the point where filling is to start.

nYStart [in]

The y-coordinate, in logical units, of the point where filling is to start.

crFill [in]

The color of the boundary or the area to be filled. To create a COLORREF color value, use the RGB macro.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The following are reasons this function might fail:

  • The fill could not be completed.
  • The given point has the boundary color specified by the crFill parameter.
  • The given point lies outside the current clipping regionthat is, it is not visible on the device.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Bitmaps Overview
Bitmap Functions
ExtFloodFill
COLORREF
RGB

 

 

Show: