The RealizePalette function maps palette entries from the current logical palette to the system palette.
UINT RealizePalette( HDC hdc );
A handle to the device context into which a logical palette has been selected.
If the function succeeds, the return value is the number of entries in the logical palette mapped to the system palette.
If the function fails, the return value is GDI_ERROR.
An application can determine whether a device supports palette operations by calling the GetDeviceCaps function and specifying the RASTERCAPS constant.
The RealizePalette function 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 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 the RealizePalette function, the system attempts to realize as many of the requested colors as possible. The same is also true for applications with inactive windows.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||wingdi.h (include Windows.h)|