IDirectDrawSurface2::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:
lplX and lplY
Addresses of the x- and y-display coordinates.