CWnd::OnSettingChange
The framework calls OnSettingChange for all top-level windows when the Win32 SystemParametersInfo function changes a system-wide setting.
afx_msg void OnSettingChange( UINT uFlags, LPCTSTR lpszSection );
An application should send the message to all top-level windows when it makes changes to system parameters, and Windows will send the message if the user changes settings via the Control Panel.
The ON_WM_SETTINGCHANGE message is similar to the ON_WM_WININICHANGE message, with the following difference:
Use ON_WM_SETTINGCHANGE when running Windows NT 4.0 or newer, or under Windows 95/98.
Use ON_WININICHANGE when running Windows NT 3.51 or older. This message is now obsolete.
You should have only one of these macros in your message map. To write a program that works for both Windows 95/98 and Windows NT 4.0, write a handler for ON_WM_SETTINGCHANGE. Under Windows NT 3.51, your handler will be called by OnSettingChange and uFlags and will always be zero.