int RealizePalette(hDC)
This function maps to the system palette entries in the logical palette currently selected into a device context.
A logical color palette acts as a buffer between color-intensive applications and the system, allowing an application to use as many colors as needed without interfering with its own color display, or with colors displayed by other windows. When a window has input focus and calls RealizePalette, Windows ensures that it will display all the colors it requests, up to the maximum number simultaneously available on the display, and displays additional colors by matching them to available colors. In addition, Windows matches the colors requested by inactive windows that call RealizePalette as closely as possible to the available colors. This significantly reduces undesirable changes in the colors displayed in inactive windows.
Parameter | Type/Description |
hDC | HDC Identifies the device context. |
The return value specifies how many entries in the logical palette were mapped to different entries in the system palette. This represents the number of entries which this function remapped to accommodate changes in the system palette since the logical palette was last realized.