DXFillSurface function

Fills an entire DXSurface with a color.

Syntax

HRESULT DXFillSurface(
  _In_ IDXSurface    *pSurface,
  _In_ DXPMSAMPLE    Color,
  _In_ BOOL          bDoOver = FALSE,
  _In_ unsigned long ulTimeOut
);

Parameters

pSurface [in]

A pointer to an IDXSurface interface that specifies the DXSurface to fill.

Color [in]

A DXPMSAMPLE object that specifies the color to use for filling.

bDoOver [in]

A value of type BOOL that specifies whether the fill color should blend with the surface image.

FALSE (FALSE)

Default. The fill color replaces the surface image.

TRUE (true)

The fill color is blended with the surface image.

ulTimeOut [in]

A value of type unsigned long that specifies the time, in milliseconds, to wait for a surface lock. The default value is 10 seconds.

Return value

Returns S_OK for a successful fill operation, or another HRESULT for an error condition.

Remarks

You can use this function to initialize or quickly erase existing surfaces.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Dxhelper.h