DirectX SDK

DirectDrawSurface7.UpdateOverlay

The DirectDrawSurface7.UpdateOverlay method repositions or modifies the visual attributes of an overlay surface. These surfaces must have the DDSCAPS_OVERLAY flag set.

object.UpdateOverlay(RECT As RECT, _ 
    ddS As DirectDrawSurface7, _ 
    rectD As RECT, _ 
    flags As CONST_DDOVERFLAGS)

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.
RECT
RECT type that defines the x, y, width, and height of the region on the source surface being used as the overlay. This parameter can be an empty RECT when hiding an overlay or to indicate that the entire overlay surface is to be used and the overlay surface conforms to any boundary and size alignment restrictions imposed by the device driver.
ddS
DirectDrawSurface7 object for the surface that is being overlaid.
rectD
RECT type 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 an empty RECT when hiding the overlay.
flags
One or more constants of the CONST_DDOVERFLAGS enumeration.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_DEVICEDOESNTOWNSURFACE
DDERR_GENERIC
DDERR_HEIGHTALIGN
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_INVALIDRECT
DDERR_INVALIDSURFACETYPE
DDERR_NOSTRETCHHW
DDERR_NOTAOVERLAYSURFACE
DDERR_OUTOFCAPS
DDERR_SURFACELOST
DDERR_UNSUPPORTED
DDERR_XALIGN