afx_msg void OnPaletteChanged( CWnd* pFocusWnd );
pFocusWnd
Specifies a pointer to the window that caused the system palette to change. The pointer may be temporary, and should not be stored.
Called after the window with input focus has realized its logical palette, thereby changing the system palette. This call allows windows without the input focus that use a color palette to realize their logical palettes and update their client areas.
To avoid creating a loop, CWnd shouldn't realize its palette unless it determines that pFocusWnd does not contain a pointer to itself.
This message-handler member function calls the Default member function. Override this member function in your derived class to handle the WM_PALETTECHANGED message.
::RealizePalette, WM_PALETTECHANGED, CWnd::Default