Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize


Fills an area of the display surface with the current brush.

BOOL FloodFill( 
   int x, 
   int y, 
   COLORREF crColor  


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


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


Specifies the color of the boundary.

Nonzero if the function is successful; otherwise 0 is returned if the filling could not be completed, the given point has the boundary color specified by crColor, or the point is outside the clipping region.

The area is assumed to be bounded as specified by crColor. The FloodFill function begins at the point specified by x and y and continues in all directions to the color boundary.

Only memory-device contexts and devices that support raster-display technology support the FloodFill member function. For information about RC_BITBLT capability, see the GetDeviceCaps member function.

The ExtFloodFill function provides similar capability but greater flexibility.

Header: afxwin.h

© 2015 Microsoft