IDirectDrawSurface2::SetColorKey
HRESULT SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey);
Sets the color key value for the DirectDrawSurface object if the hardware supports color keys on a per surface basis.
·Returns DD_OK is successful, or one of the following error values otherwise:
dwFlags
Determines which color key is requested.
Set if the structure contains a color space. Not set if the structure contains a single color key.
Set if the structure specifies a color key or color space to be used as a destination color key for blit operations.
Set if the structure specifies a color key or color space to be used as a destination color key for overlay operations.
Set if the structure specifies a color key or color space to be used as a source color key for blit operations.
Set if the structure specifies a color key or color space to be used as a source color key for overlay operations.
lpDDColorKey
Address of the DDCOLORKEY structure that contains the new color key values for the DirectDrawSurface object.