Problem about catching WM_THEMECHANGED
Hi,
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.
Thanks in advance.
Re: Problem about catching WM_THEMECHANGED
Welcome to the site. Since,you have a test application that works properly, I would suggest narrowing down code in your 'real' app to isolate the problem. Is this a MFC/ATL app or Win32 app?
Arjay
Re: Problem about catching WM_THEMECHANGED
Thanks,
It's an MFC app. I'm doing that way, but it should take a long time .
Thanks in advance.
Re: Problem about catching WM_THEMECHANGED
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.