19.6 Responding to Changes in the System Palette

Whenever an application realizes a logical palette for a particular device context, Windows maps colors in that logical palette into the system palette if the system palette does not already contain those colors and if there are available entries in the system palette. Because the system palette has changed, many or all of the colors displayed in the client areas of all windows using palettes likewise change. So that applications can respond appropriately to these changes, Windows sends the following two messages to overlapped and pop-up windows to deal with the changes:

WM_QUERYNEWPALETTE

WM_PALETTECHANGED