CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    2

    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.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    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

  3. #3
    Join Date
    Dec 2005
    Posts
    2

    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.

  4. #4
    Join Date
    Jan 2013
    Posts
    2

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured