WM_PALETTEISCHANGING
hwndRealize = (HWND)wParam; /* window to realize palette */
The WM_PALETTEISCHANGING message informs applications that an application is going to realize its logical palette.
hwndRealize
Value of wParam. Specifies the handle of the window that is going to realize its logical palette.
An application should return zero if it processes this message.
The application changing its palette does not wait for acknowledgment of this message before changing the palette and sending the WM_PALETTECHANGED message. As a result, the palette may already be changed by the time an application receives this message.
WM_PALETTECHANGED, WM_QUERYNEWPALETTE