Gdi::RealizePalette_I (Windows Embedded CE 6.0)
1/6/2010
This method maps palette entries from the current logical palette to the system palette.
Syntax
static WINGDIAPI unsigned int WINAPI RealizePalette_I(
HDC hdc
);
Parameters
- hdc
[in] Handle to the device context into which you have selected a logical palette.
Return Value
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.
Remarks
This method is an internal version of the RealizePalette function.
Gdi::RealizePalette_I fails if the device associated with hdc does not have a settable palette. Call the Gdi::GetDeviceCaps_I method, specifying the RASTERCAPS constant, to determine if the device has a settable palette before calling Gdi::RealizePalette_I.
Gdi::RealizePalette_I modifies the palette for the device associated with the specified device context:
- If the device context is a memory device context, the color table for the bitmap selected into the device context is modified.
- If the device context is a display device context, 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 the window for an application has the focus and the application calls Gdi::RealizePalette_I, the system attempts to realize as many of the requested colors as possible. This behavior also holds 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 color matching operations for foreground applications; Windows Embedded CE overwrites the system palette entries with the palette entries for the hdc parameter*.*
Windows Embedded CE does not support Gdi::RealizePalette_I for background applications.
Requirements
Header | gdi.hpp |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
Gdi
RealizePalette
Gdi::GetDeviceCaps_I
Gdi::SelectPalette_I