IDirectDrawSurface7::GetColorKey method (ddraw.h)

Retrieves the color key value for this surface.

Syntax

HRESULT GetColorKey(
  [in]  DWORD        unnamedParam1,
  [out] LPDDCOLORKEY unnamedParam2
);

Parameters

[in] unnamedParam1

A value that can be set to one of the following flags to specify the color key to retrieve:

DDCKEY_DESTBLT

A color key or color space to be used as a destination color key for bit block transfer (bitblt) 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 bitblt operations.

DDCKEY_SRCOVERLAY

A color key or color space to be used as a source color key for overlay operations.

[out] unnamedParam2

A pointer to a DDCOLORKEY structure that receives the current values for the specified color key of the DirectDrawSurface object.

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_INVALIDOBJECT
  • DDERR_INVALIDPARAMS
  • DDERR_NOCOLORKEY
  • DDERR_NOCOLORKEYHW
  • DDERR_SURFACELOST
  • DDERR_UNSUPPORTED

Requirements

Requirement Value
Target Platform Windows
Header ddraw.h
Library Ddraw.lib
DLL Ddraw.dll

See also

IDirectDrawSurface7