IDirectDrawSurface::UpdateOverlay

HRESULT UpdateOverlay(LPRECT lpSrcRect,

LPDIRECTDRAWSURFACE lpDDDestSurface,

LPRECT lpDestRect, DWORD dwFlags,

LPDDOVERLAYFX lpDDOverlayFx);

Repositions or modifies the visual attributes of an overlay surface. These surfaces must have the DDSCAPS_OVERLAY value set.

·Returns DD_OK if successful, or one of the following error values otherwise:

DDERR_GENERIC DDERR_HEIGHTALIGN
DDERR_INVALIDOBJECT DDERR_INVALIDPARAMS
DDERR_INVALIDRECT DDERR_INVALIDSURFACETYPE
DDERR_NOSTRETCHHW DDERR_NOTAOVERLAYSURFACE
DDERR_SURFACELOST DDERR_UNSUPPORTED
DDERR_XALIGN  

lpSrcRect

Address of a RECT structure that defines the x, y, width, and height of the region on the source surface being used as the overlay.

lpDDDestSurface

Address of the DirectDrawSurface structure that represents the DirectDrawSurface. This is the surface that is being overlaid.

lpDestRect

Address of a RECT structure that defines the x, y, width, and height of the region on the destination surface that the overlay should be moved to.

dwFlags

DDOVER_ADDDIRTYRECT

Adds a dirty rectangle to an emulated overlaid surface.

DDOVER_ALPHADEST

Uses the alpha information in pixel format or the alpha channel surface attached to the destination surface as the alpha channel for the destination overlay.

DDOVER_ALPHADESTCONSTOVERRIDE

Uses the dwAlphaDestConst member in the DDOVERLAYFX structure as the destination alpha channel for this overlay.

DDOVER_ALPHADESTNEG

The NEG suffix indicates that the destination surface becomes more transparent as the alpha value increases. (0 is opaque).

DDOVER_ALPHADESTSURFACEOVERRIDE

Uses the lpDDSAlphaDest member in the DDOVERLAYFX structure as the alpha channel destination for this overlay.

DDOVER_ALPHAEDGEBLEND

Uses the dwAlphaEdgeBlend member in the DDOVERLAYFX structure as the alpha channel for the edges of the image that border the color key colors.

DDOVER_ALPHASRC

Uses the alpha information in pixel format or the alpha channel surface attached to the source surface as the source alpha channel for this overlay.

DDOVER_ALPHASRCCONSTOVERRIDE

Uses the dwAlphaSrcConst member in the DDOVERLAYFX structure as the source alpha channel for this overlay.

DDOVER_ALPHASRCNEG

The NEG suffix indicates that the source surface becomes more transparent as the alpha value increases.

DDOVER_ALPHASRCSURFACEOVERRIDE

Uses the lpDDSAlphaSrc member in the DDOVERLAYFX structure as the alpha channel source for this overlay.

DDOVER_DDFX

Uses the overlay FX flags to define special overlay FX.

DDOVER_HIDE

Turns this overlay off.

DDOVER_KEYDEST

Uses the color key associated with the destination surface.

DDOVER_KEYDESTOVERRIDE

Uses the dckDestColorkey member in the DDOVERLAYFX structure as the color key for the destination surface.

DDOVER_KEYSRC

Uses the color key associated with the source surface.

DDOVER_KEYSRCOVERRIDE

Uses the dckSrcColorkey member in the DDOVERLAYFX structure as the color key for the source surface.

DDOVER_SHOW

Turns this overlay on.

DDOVER_ZORDER

Uses the dwZOrderFlags member in the DDOVERLAYFX structure as the z-order for the display of this overlay. The lpDDSRelative member will be used if the dwZOrderFlags member is set to either DDOVERZ_INSERTINBACKOF or DDOVERZ_INSERTINFRONTOF.

lpDDOverlayFx

See the DDOVERLAYFX structure.