GetForeground method

Retrieves a pointer to the DXSurface used as a foreground.

Syntax

HRESULT retVal = object.GetForeground(ppSurface, pbTile, pOrigin);

Parameters

  • ppSurface [out]
    Type: IDXSurface

    Optional address of a pointer to the interface through which to access the foreground surface.

  • pbTile [out]
    Type: BOOL

    Optional pointer to a BOOL that indicates whether the foreground surface is tiled. If TRUE, the surface is tiled over the background. Otherwise, the value is FALSE.

  • pOrigin [out]
    Type: POINT

    Optional pointer to the coordinates currently used as the origin.

Remarks

All parameters to this method are optional. If you do not need to retrieve a particular piece of data, pass a NULL pointer for that argument.

If there is no foreground surface, this method returns S_OK, but ppSurface is set to NULL. When a pointer to the interface for the foreground surface is retrieved, the method automatically calls AddRef on the interface. The client is responsible for calling Release on the interface when it is no longer needed.

See also

IDXSurfaceModifier::SetBackground