Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method changes the color key.

Syntax

HRESULT SetColorKey(
  COLORKEY* 
pColorKey
);

Parameters

pColorKey

[out] Pointer to the COLORKEYvalue to be set. If successful, the actual color key value selected is copied to this parameter.

Return Value

Returns an HRESULTvalue that depends on the implementation.

HRESULTcan be one of the following standard constants, or other values not listed.

Value Description

E_FAIL

Failure.

E_POINTER

Null pointer argument.

E_INVALIDARG

Invalid argument.

E_NOTIMPL

Method is not supported.

S_OK or NOERROR

Success.

Remarks

If you change the color key by using the IOverlay::SetColorKeymethod, all the advise links will receive an IOverlayNotify::OnColorKeyChangecallback method with the new color.

When using IOverlayon a palettized display, a filter can either install a color key (using IOverlay::SetColorKey) or install a palette (using IOverlay::SetPalette), but not both. This is because color keys in this mode require a palette to be realized that would conflict with SetPalette.

Color keys can be uninstalled by requesting a color key with the CK_NOCOLORKEY flag. Any palette installed through SetPalettecan be uninstalled by calling SetPaletteand passing in null parameters (that is, SetPalette(0,NULL)).

Trying to set a palette when a color key is installed returns VFW_E_PALETTE_SET.

Trying to set a color key when a palette is installed returns VFW_E_COLOR_KEY_SET.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment,
Version 2.12 requires DXPAK 1.0 or later

See Also

Reference

IOverlay Interface