I have a problem about catching the WM_THEMECHANGED message. When visual style has been changed from 'Windows Classic' to 'Windows XP,' I could not catch any WM_THEMECHANGED message. I used Spy to monitor the WM_THEMECHANGED message sent to my window. I caught 3 messages when changing from 'XP' to 'Classic" but none in the reverse direction, which is from 'Classic' to 'XP' Do anybody have experience of this?
I build another app to test this problem. Everything is ok. WM_THEMECHANGED message is properly caught whenever the visual style is changed. So, there must be something wrong in my code.
I've had the problem, it appears WM_THEMECHANGED is only sent when changing from "having a theme" to "having no theme". As you probably want to call CloseThemeData and attempt to open a new theme (assuming there is one) I just do that in WM_SYSCOLORCHANGE and don't bother with the theme message, WM_SYSCOLORCHANGE is also sent when the theme changes.