IDirectDrawSurface7::GetColorKey method

Retrieves the color key value for this surface.

Syntax


HRESULT GetColorKey(
  [in]   DWORD dwFlags,
  [out]  LPDDCOLORKEY lpDDColorKey
);

Parameters

dwFlags [in]

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.

lpDDColorKey [out]

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

Remarks

You must use LoadLibrary to explicitly link to Ddraw.dll and then use GetProcAddress to access the GetColorKey method.

Requirements

Header

Ddraw.h

Library

Ddraw.dll

See also

IDirectDrawSurface7

 

 

Community Additions

ADD
Show:
© 2014 Microsoft