Compartilhar via


Sharing Palettes (Windows CE 5.0)

Send Feedback

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::SetPalette method, 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.

If a palette is detached from a surface by using IDirectDrawSurface5::SetPalette with a NULL palette interface pointer, the reference count of the surface's palette is decremented.

**Note   **If IDirectDrawSurface5::SetPalette is 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.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.