FillPath

  BOOL FillPath(hdc)    
  HDC hdc;    

The FillPath function closes any open figures in the current path and fills the result using the current brush and polygon filling mode. See SetPolyFillMode for a description of the filling modes.

Parameters

hdc

Identifies the device context.

Return Value

The return value is TRUE if the call succeeded, otherwise FALSE.

Comments

The DC must have an inactive path bracket, started by calling BeginPath and ended by calling EndPath. FillPath discards the path.

Errors

Use the GetLastError function to retrieve the error value, which may be one of the following:

ERROR_INVALID_MODE  
ERROR_INVALID_PARAMETER  
ERROR_NOT_ENOUGH_MEMORY  

See Also

BeginPath, StrokeAndFillPath, StrokePath, SetPolyFillMode