IOverlay::GetDefaultColorKey method

The GetDefaultColorKey method retrieves the default color key used for a chroma key overlay.


HRESULT GetDefaultColorKey(
  [out] COLORKEY *pColorKey


pColorKey [out]

Pointer to a variable that receives the default color key.

Return value

Returns S_OK if successful. If the method fails, it returns an HRESULT error code.


A filter using color keys can get a default color from the video renderer. The default color key can then be installed into the window using IOverlay::SetColorKey. The colors returned through this method vary depending on the current display mode. If the colors are 8-bit palettized, they will be bright system colors (such as magenta). If the display is in a true-color mode, they will be shades of black.

The IOverlay interface is used to ensure that separate instances of the renderer on the same computer get different color keys so that overlays do not conflict.


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]


Strmif.h (include Dshow.h)



See also

Error and Success Codes
IOverlay Interface