DirectX SDK |
The DirectDraw7.GetSurfaceFromDC method retrieves the DirectDrawSurface7 object for a surface, based on its GDI device context handle.
object.GetSurfaceFromDC(hdc As Long) As DirectDrawSurface7
If the method succeeds, it returns a DirectDrawSurface7.
If the method fails, it raises an error, and Err.Number can be set to one of the following values:
DDERR_GENERIC |
DDERR_INVALIDPARAMS |
DDERR_OUTOFMEMORY |
DDERR_NOTFOUND |
This method succeeds only for device context handles that identify surfaces already associated with the DirectDraw object.