IDirectDrawSurface::GetOverlayPosition

HRESULT GetOverlayPosition(LPLONG lplX, LPLONG lplY);

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

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

DDERR_GENERIC DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS DDERR_INVALIDPOSITION

DDERR_NOOVERLAYDEST DDERR_NOTAOVERLAYSURFACE

DDERR_OVERLAYNOTVISIBLE DDERR_SURFACELOST

lplX

Address of the x-display coordinate.

lplY

Address of the y-display coordinate.