Compartir a través de


IDirectDraw::GetSurfaceFromDC (Compact 2013)

3/26/2014

This method retrieves the IDirectDrawSurface interface for a surface based on its GDI device context handle.

Syntax

HRESULT GetSurfaceFromDC(
  HDC hdc,
  LPDIRECTDRAWSURFACE* lpDDS
); 

Parameters

  • hdc
    Handle to a display device context.
  • lpDDS
    Address of a variable that will be filled with a valid IDirectDrawSurface interface pointer if the call succeeds.

Return Value

If the method succeeds, the return value is DD_OK.

If the method fails, the return value may be one of the following error values:

DDERR_GENERIC

DDERR_INVALIDPARAMS

DDERR_OUTOFMEMORY

DDERR_NOTFOUND

For more information on these error codes see DirectDraw Return Values.

Remarks

This method will succeed only for device context handles that identify surfaces already associated with the DirectDraw object.

Requirements

Header

ddraw.h

Library

ddraw.lib

See Also

Reference

IDirectDraw
DirectDraw Reference
DirectDraw Interfaces

Other Resources

DirectDraw