Microsoft DirectX 9.0 |
The GetOverlayPosition method returns the display coordinates of the surface, given a visible, active overlay surface (DDSCAPS_OVERLAY set).
Syntax
HRESULT GetOverlayPosition(
LPLONG lplX,
LPLONG lplY
);
Parameters
lplX
Points to the X display coordinate.
lplY
Points to the Y display coordinate.
Return Values
Value | Description |
DD_OK | The method succeeded. |
DDERR_INVALIDPARAMS | One or more of the input parameters is invalid. |
DDERR_INVALIDOBJECT | DirectDraw received a pointer that was an invalid DirectDraw object. |
DDERR_SURFACELOST | Access to this surface is being refused because the surface memory is gone. The DirectDrawSurface object representing this surface should have Restore called on it. |
DDERR_GENERIC | Generic failure. |
DDERR_NOTAOVERLAYSURFACE | Returned when an overlay method is called for a non-overlay surface. |
DDERR_NOOVERLAYDEST | Returned when GetOverlayPosition is called on an overlay that UpdateOverlay has never been called on to establish a destination. |
DDERR_OVERLAYNOTVISIBLE | Returned when GetOverlayPosition is called on a hidden overlay. |
DDERR_INVALIDPOSITION | Returned when the position of the overlay on the destination is no longer legal for that destination. |
See Also