SetBackground method

Sets the surface modifier background surface.

Syntax

HRESULT retVal = object.SetBackground(pSurface);

Parameters

  • pSurface [in]
    Type: IDXSurface

    Pointer to the surface to use as a background surface; this parameter can be NULL to indicate no background surface.

Remarks

If pSurface is NULL, the current bounds of the surface are not changed. If there is a fill color, the Surface Modifier uses the fill color as the background color.

If pSurface is not NULL, the Surface Modifier uses the size of the background surface as its bounds, overriding any previous call to IDXSurfaceModifier::SetBounds. Subsequent calls to IDXSurfaceModifier::SetBounds must specify a bounds equal to the bounds of the background surface or else an error results. For more information about the relationship of various properties of Surface Modifiers, see the IDXSurfaceModifier interface.

See also

IDXSurfaceModifier::GetBackground