I am catching the WM_SETTINGSCHANGE in WndProc so that I can update my app for dark/light mode changes. I run the app and catch the messages when I change my user preference in Personalization / Colors / Choose Your Mode (light, dark, custom) on Windows 11.
I notice that changing my preference generates TWO of the WM_SETTINGSCHANGE messages in WndProc. They do have different numbers in the LParam, but I can't figure out how to print the LParam string in C# (if that makes a difference).
The values of the two messages are as follows, where 0=user policy change. I don't know what the values of the lparams are - the doc says they are the addresses of strings (possibly to null strings?) provided by the sender of the messages:
wparam=0, lparam=800528915624
wparam=0, lparam=800528912280
Does this mean I have to update all my app settings twice whenever I get a message? (The Microsoft doc for WM_SETTINGSCHANGE recommends updating all app system settings each time.) Does anyone know why my single preference change triggers TWO settings change messages? Thank you.