ExtFloodFill

  BOOL ExtFloodFill(hdc, nXStart, nYStart, clrref, fuFillType)    
  HDC hdc; /* device-context handle */
  int nXStart; /* x-coordinate where filling begins */
  int nYStart; /* y-coordinate where filling begins */
  COLORREF clrref; /* color of fill */
  UINT fuFillType; /* fill type */

The ExtFloodFill function fills an area of the display surface with the current brush.

Parameters

hdc

Identifies a device context.

nXStart

Specifies the logical x-coordinate of the point where filling begins.

nYStart

Specifies the logical y-coordinate of the point where filling begins.

clrref

Specifies the color of the boundary or of the area to be filled. The interpretation of clrref depends on the value of the fuFillType parameter.

fuFillType

Specifies the type of fill to be performed. It must be one of the following values:

Value Meaning

FLOODFILLBORDER The fill area is bounded by the color specified by clrref. This style is identical to the filling performed by the FloodFill function.
FLOODFILLSURFACE The fill area is defined by the color that is specified by clrref. Filling continues outward in all directions as long as the color is encountered. This style is useful for filling areas with multicolored boundaries.

Return Value

The return value is TRUE if the function is successful. It is FALSE if:

The filling could not be completed.

The given point has the boundary color specified by crColor (if FLOODFILLBORDER was requested).

The given point does not have the color specified by crColor (if FLOODFILLSURFACE was requested).

The point is outside the clipping region, i.e. it is not visible on the device.

Comments

If fuFillType is set to FLOODFILLBORDER, Windows assumes that the area to be filled is completely bounded by the color specified by the clrref parameter. The function will begin filling at the point specified by the nXStart and nYStart parameters and continue in all directions until it reaches the boundary.

If fuFillType is set to FLOODFILLSURFACE, Windows assumes that the area to be filled is a single color. The function begins to fill the area at the point specified by nXStart and nYStart and continues in all directions, filling all adjacent regions containing the color specified by clrref.

Only memory device contexts and devices that support raster-display function support the ExtFloodFill function. To determine whether a device supports this technology, an application should call the GetDeviceCaps function.

See Also

GetDeviceCaps