Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This method retrieves the IDirectDrawSurface interface for a surface based on its GDI device context handle.
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 Values
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 |
Remarks
This method will succeed only for device context handles that identify surfaces already associated with the DirectDraw object.
Requirements
Pocket PC: Windows Mobile 5.0 and later
Smartphone: Windows Mobile 5.0 and later
OS Versions: Windows CE 5.01 and later
Header: Ddraw.h.
Library: Ddraw.lib.
Send Feedback on this topic to the authors