Microsoft Windows CE 3.0  

Sharing Palettes

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.

Palettes can be shared among multiple surfaces. The same palette can be set on the front buffer and the back buffer of a flipping chain or shared among multiple texture surfaces. When an application attaches a palette to a surface by using the IDirectDrawSurface5::SetPalettemethod, the surface increments the reference count of that palette. When the reference count of the surface reaches 0, the surface will decrement the reference count of the attached palette. In addition, if a palette is detached from a surface by using IDirectDrawSurface5::SetPalettewith a NULL palette interface pointer, the reference count of the surface's palette will be decremented.

Note   If IDirectDrawSurface5::SetPaletteis called several times consecutively on the same surface with the same palette, the reference count for the palette is incremented only once. Subsequent calls do not affect the palette's reference count.

 Last updated on Tuesday, May 18, 2004

© 2004 Microsoft Corporation. All rights reserved.