IDirectDrawSurface::UpdateOverlay (Compact 2013)
This method repositions or modifies the visual attributes of an overlay surface. These surfaces must have the DDSCAPS_OVERLAY flag set.
HRESULT UpdateOverlay( LPRECT lpSrcRect, LPDIRECTDRAWSURFACE lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx );
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.
This parameter can be NULL when hiding an overlay, or to indicate that the entire overlay surface is to be used and that the overlay surface conforms to any boundary and size alignment restrictions imposed by the device driver.
Address of the IDirectDrawSurface interface for the surface that is being overlaid.
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. This parameter can be NULL when hiding the overlay.
The following table shows the possible flags.
Indicates that the overlay should be alpha-blended with the destination using the dwAlphaConst member of the DDOVERLAYFX structure.
Uses either the alpha information in pixel format or the alpha channel surface attached to the destination surface as the alpha channel for this overlay.
Indicates that the destination surface becomes more transparent as the alpha value increases (zero equals opaque).
Uses either the alpha information in pixel format or the alpha channel surface attached to the source surface as the source alpha channel for this overlay.
Indicates that the source surface becomes more transparent as the alpha value increases (zero is opaque).
Turns off this overlay.
Uses the color key associated with the destination surface.
Uses the dckDestColorkey member of the DDOVERLAYFX structure as the color key for the destination surface.
Uses the color key associated with the source surface.
Uses the dckSrcColorkey member of the DDOVERLAYFX structure as the color key for the source surface.
Renders the overlay as mirrored so that the left side of the surface is drawn on the right and the right side is drawn on the left.
Renders the overlay as mirrored so that the top of the surface is drawn at the bottom and the bottom is drawn at the top.
Turns on this overlay.
Waits for a previously initiated drawing operation to complete instead of returning immediately with the DDERR_WASSTILLDRAWING return value.
If a previous drawing operation is in progress at the time of the call, this flag defers returning from the call until the overlay is updated or an error occurs.
Waits for a V-Sync before performing the overlay update.
Address of a DDOVERLAYFX structure that describes the effects to be used. This parameter can be NULL if the DDOVER_DDFX flag is not specified.
If the method succeeds, the return value is DD_OK.
If the method fails, the return value may be one of the following error values:
For more information on these error codes see DirectDraw Return Values.