Article ID: 77702 - Last Review: November 21, 2006 - Revision: 3.2 INFO: Processing WM_PALETTECHANGED and WM_QUERYNEWPALETTEThis article was previously published under Q77702 SUMMARY
An application that manipulates the system palette should process the
WM_PALETTECHANGED and WM_QUERYNEWPALETTE messages to maintain its
appearance during system palette and input focus changes.
MORE INFORMATION
The WM_PALETTECHANGED message informs all windows that the window with
input focus has realized its logical palette, thereby changing the
system palette. This message allows a window without input focus that
uses a color palette to realize its logical palettes and update its
client area.
This message is sent to all windows, including the one that changed the system palette and caused this message to be sent. The wParam of this message contains the handle of the window that caused the system palette to change. To avoid an infinite loop, care must be taken to check that the wParam of this message does not match the window's handle. The following sample code demonstrates how to process WM_PALETTECHANGED: The WM_QUERYNEWPALETTE message informs a window that it is about to receive input focus. In response, the window receiving focus should realize its palette as a foreground palette and update its client area. If the window realizes its palette, it should return TRUE; otherwise, it should return FALSE. The following sample code demonstrates processing WM_QUERYNEWPALETTE: APPLIES TO
| Article Translations
|
Back to the top
