Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RealizePalette

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function maps palette entries from the current logical palette to the system palette.


UINT RealizePalette(
  HDC hdc
);

hdc

[in] Handle to the device context (DC) into which a logical palette has been selected.

The number of entries in the logical palette mapped to the system palette indicates success.

GDI_ERROR indicates failure.

To get extended error information, call GetLastError.

RealizePalette will return 0 entries realized if the hdc does not have a settable palette. Call the GetDeviceCaps function, specifying the RASTERCAPS constant, to determine if the device has a settable palette before calling RealizePalette.

RealizePalette modifies the palette for the device associated with the specified device context.

If the device context is a memory DC, the color table for the bitmap selected into the DC is modified.

If the device context is a display DC, the physical palette for that device is modified.

A logical color palette is a buffer between color-intensive applications and the system, allowing these applications to use as many colors as needed without interfering with colors displayed by other windows.

When an application's window has the focus and it calls RealizePalette, the system attempts to realize as many of the requested colors as possible. The same is also true for applications with inactive windows.

Windows Embedded CE does not arbitrate between the palettes of the background and foreground applications. The foreground application has complete control of the system palette. Therefore, Windows Embedded CE does not perform any color matching operations for foreground applications; it simply overwrites the system palette entries with the hdc parameter's palette entries.

Windows Embedded CE does not support RealizePalette for background applications.

Headerwindows.h
Librarycoredll.lib
Windows Embedded CEWindows CE 2.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2014 Microsoft