DirectX SDK

DirectDrawSurface7.GetOverlayPosition

Given a visible, active overlay surface (DDSCAPS_OVERLAY flag set), the DirectDrawSurface7.GetOverlayPosition method returns the display coordinates of the surface.

object.GetOverlayPosition(x As Long, y As Long)

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.
x and y
Addresses of the x and y display coordinates.

Return Values

If the method succeeds, it returns the display coordinates of the active overlay surface.

Error Codes

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

DDERR_GENERIC
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_INVALIDPOSITION
DDERR_NOOVERLAYDEST
DDERR_NOTAOVERLAYSURFACE
DDERR_OVERLAYNOTVISIBLE
DDERR_SURFACELOST

See Also

DirectDrawSurface7.SetOverlayPosition, DirectDrawSurface7.UpdateOverlay