Hello,
Welcome to Microsoft Q&A!
WM_SETTINGCHANGE message: Applications should send WM_SETTINGCHANGE to all top-level windows when they make changes to system parameters. A message that is sent to all top-level windows when the SystemParametersInfo function
changes a system-wide setting or when policy settings have changed.
WM_THEMECHANGED message: Broadcast to every window following a theme change event. The window is sent a WM_THEMECHANGED message at the end of a SetWindowTheme call
.
As far as I'm concerned, when you change the system theme from settings you will receive WM_SETTINGCHANGE message
.
when I change system theme from the settings, I observed that WM_SETTINGCHANGE is being invoked few amount of times
The Settings app broadcasts WM_SETTINGSCHANGE messages
using SendMessageTimeout
, which sends the WM_SETTINGCHANGE message to all top-level windows. The function does not return until each window has timed out. Therefore, the total wait time can be up to the value of uTimeout multiplied by the number of top-level windows. As a result, you may receive multiple messages.
I suggest you could refer to the thread:
Thank you.
Jeanine
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.