IDirectDrawSurface7::GetOverlayPosition method (ddraw.h)

Retrieves the display coordinates of this surface. This method is used on a visible, active overlay surface (that is, a surface that has the DDSCAPS_OVERLAY flag set).

Syntax

HRESULT GetOverlayPosition(
  LPLONG ,
  LPLONG 
);

Parameters

unnamedParam1

A pointer to a variable that receives the x- display coordinate of this surface if the call succeeds.

unnamedParam2

A pointer to a variable that receives the y-display coordinate of this surface if the call succeeds.

Return value

If the method succeeds, the return value is DD_OK.

If it fails, the method can return one of the following error values:

  • DDERR_GENERIC
  • DDERR_INVALIDOBJECT
  • DDERR_INVALIDPARAMS
  • DDERR_INVALIDPOSITION
  • DDERR_NOOVERLAYDEST
  • DDERR_NOTAOVERLAYSURFACE
  • DDERR_OVERLAYNOTVISIBLE
  • DDERR_SURFACELOST

Remarks

You must use LoadLibrary to explicitly link to Ddraw.dll and then use GetProcAddress to access the GetOverlayPosition method.

Requirements

   
Target Platform Windows
Header ddraw.h
Library Ddraw.lib
DLL Ddraw.dll

See also

IDirectDrawSurface7