StrokeAndFillPath

  BOOL StrokeAndFillPath(hdc)    
  HDC hdc;    

The StrokeAndFillPath function renders the specified path by closing any open figures in the path, stroking the outline of the path using the current pen, and filling the interior using the current brush. This has the same effect as closing all the open figures in the path, and stroking and filling the path separately, except that the filled region will not overlap the stroked region even if the pen is a wide pen.

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. StrokeAndFillPath 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, FillPath, StrokePath, SetPolyFillMode