The m_PaletteVersion member variable is used to track when the palette changes.
Syntax
LONG m_PaletteVersion;
See Also