DdGetDC function (ddrawgdi.h)
[This function is subject to change with each operating system revision. Instead, use the DirectDraw and Microsoft Direct3DAPIs; these APIs insulate applications from such operating system changes, and hide many other difficulties involved in interacting directly with display drivers.]
Wrapper for the NtGdiDdGetDC function and returns a Windows Graphics Device Interface (GDI) device context (DC) that represents the Microsoft DirectDraw surface indicated.
GdiEntry7 is defined as an alias for this function.
HDC DdGetDC(
LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
LPPALETTEENTRY pColorTable
);
pSurfaceLocal
Pointer to the DirectDraw surface for which a DC is requested.
pColorTable
Optional pointer to a 256-entry array of PALETTEENTRY structures. If the color table is null, and the surface and display mode are both 8 bits per pixel, the DC shares the color table of the device.
If successful, this function returns a valid HDC; otherwise it returns NULL.
If both the surface and the current display mode are palletized at 8 bits per pixel, the DC can be given the special property that its color table is shared by the color table of the display device. Applications are advised to call IDirectDrawSurface7::GetDC instead, which provides the same functionality in a manner independent of the operating system.
The returned DC must be freed by a call to NtGdiDdReleaseDC or GdiEntry8.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | ddrawgdi.h |