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.
Creates a GDI-compatible handle of a device context for this surface.
Syntax
HRESULT GetDC(
[out] HDC *unnamedParam1
);
Parameters
[out] unnamedParam1
A pointer to a variable that receives the handle of the device context for this surface.
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_DCALREADYCREATED
- DDERR_GENERIC
- DDERR_INVALIDOBJECT
- DDERR_INVALIDPARAMS
- DDERR_INVALIDSURFACETYPE
- DDERR_SURFACELOST
- DDERR_UNSUPPORTED
- DDERR_WASSTILLDRAWING
Remarks
GetDC uses an internal version of the IDirectDrawSurface7::Lock method to lock the surface. The surface remains locked until the IDirectDrawSurface7::ReleaseDC method is called.
Requirements
| Requirement | Value |
|---|---|
| Target Platform | Windows |
| Header | ddraw.h |
| Library | Ddraw.lib |
| DLL | Ddraw.dll |