Blitting with Color Keys

If you want to use color keys for surfaces when calling the IDirectDrawSurface5::BltFast method, you must set one or both of the DDBLTFAST_SRCCOLORKEY or DDBLTFAST_DESTCOLORKEY flags in the dwTrans parameter.

In order to use colors keys when calling IDirectDrawSurface5:Blt, you pass one or both of the DDBLT_KEYSRC or DDBLT_KEYDEST flags in the dwFlags parameter. Alternatively, you can put the appropriate color values in the ddckDestColorkey and ddckSrcColorkey members of the DDBLTFX structure that is passed to the method through the lpDDBltFx parameter. In this case you must also set the DBLT_KEYSRCOVERRIDE or DDBLT_KEYDESTOVERRIDE flag, or both, in the dwFlags parameter, so that the selected keys are taken from the DDBLTFX structure rather than from the surface properties.

© 1992-2003 Microsoft Corporation. All rights reserved.