Platform SDK: DirectX

IDirectDrawSurface7::GetColorKey

The IDirectDrawSurface7::GetColorKey method retrieves the color key value for the DirectDrawSurface object.

HRESULT GetColorKey(
  DWORD dwFlags,             
  LPDDCOLORKEY lpDDColorKey  
);

Parameters

dwFlags
One of the following flags determines which color key is requested:
DDCKEY_DESTBLT
A color key or color space to be used as a destination color key for blit operations.
DDCKEY_DESTOVERLAY
A color key or color space to be used as a destination color key for overlay operations.
DDCKEY_SRCBLT
A color key or color space to be used as a source color key for blit operations.
DDCKEY_SRCOVERLAY
A color key or color space to be used as a source color key for overlay operations.
lpDDColorKey
Address of the DDCOLORKEY structure to be filled with the current values for the specified color key of the DirectDrawSurface object.

Return Values

If the method succeeds, the return value is DD_OK.

If it fails, the method can return one of the following error values:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_NOCOLORKEY
DDERR_NOCOLORKEYHW
DDERR_SURFACELOST
DDERR_UNSUPPORTED

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 98.
  Header: Declared in ddraw.h.

See Also

IDirectDrawSurface7::SetColorKey