IDirect3DViewport::GetBackground

HRESULT GetBackground(LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid);

Retrieves the handle of a material that represents the current background associated with the viewport.

·Returns D3D_OK if successful, or an error otherwise, which may be one of the following values:

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

lphMat

Address that will contain the handle of the material being used as the background.

lpValid

Address of a variable that will be filled to indicate whether a background is associated with the viewport. If this parameter is FALSE, no background is associated with the viewport.