Microsoft DirectX 9.0

IDirectDrawSurface::UpdateOverlayZOrder

The UpdateOverlayZOrder method sets the z order of an overlay. The z order is used to determine which overlay should be occluded when multiple overlays are being displayed simultaneously. Overlay positions are all relative to other overlays -- there is no true z value for them.

Syntax

HRESULT UpdateOverlayZOrder(
  DWORD dwFlags,
  LPDIRECTDRAWSURFACE lpDDSReference
  );

Parameters

dwFlags

Zero or more of the following flags.

Value Description
DDOVERZ_INSERTINBACKOF Insert this overlay in the overlay chain in back of the overlay specified as the reference overlay.
DDOVERZ_INSERTINFRONTOF Insert this overlay in the overlay chain in front of the overlay specified as the reference overlay.
DDOVERZ_MOVEBACKWARD Move this overlay one overlay position backward.
DDOVERZ_MOVEFORWARD Move this overlay one overlay position forward.
DDOVERZ_SENDTOBACK Move this overlay to the back of the overlay chain.
DDOVERZ_SENDTOFRONT Move this overlay to the front of the overlay chain.

lpDDSReference

Points to the IDirectDrawSurface interface of the surface that should be used as a relative position in the overlay chain. This parameter is needed only for DDOVERZ_INSERTINBACKOF and DDOVERZ_INSERTINFRONTOF.

Return Values

Value Description
DD_OK The method succeeded.
DDERR_INVALIDOBJECT DirectDraw received a pointer that was an invalid DirectDraw object.
DDERR_INVALIDPARAMS One or more of the input parameters is invalid.
DDERR_NOTAOVERLAYSURFACE Returned when an overlay method is called for a non-overlay surface.

See Also