0

I need to know the current theme in window 7 using win32. Whether the theme is classic/aero. I am a newbie in win32.Thank you

  • Do you want to know the user's setting, or the setting applied to your process? Why do you want to know this information? It is likely that you are asking the wrong question. – David Heffernan Aug 13 '15 at 10:43
  • I want to know the name of the theme @DavidHeffernan – Rakesh Kumar Aug 13 '15 at 10:45
  • Why do you want to know that? What are you going to do with the information? I can give a theme any name I like. In fact I can give an Aero theme a name such as Windows Classic if I want to be perverse. You'll get better help if you explain the context of your question. – David Heffernan Aug 13 '15 at 10:49
  • Actually, in my application I have everything works fine with Aero theme, but when the theme is changed to Classic, my application looks nasty. The buttons and images are not reloaded properly. So that by getting the theme I can separately reload them only in classic mode rather than reloading it always @DavidHeffernan – Rakesh Kumar Aug 13 '15 at 10:54
  • Great. In that case you have asked the wrong question. The correct question is how to detect that your application is themed. – David Heffernan Aug 13 '15 at 10:57
  • "Classic" isn't a theme, it's an absence of themes. – Jonathan Potter Aug 13 '15 at 11:02
  • The answer to the question you did not ask is [WM_THEMECHANGED](https://msdn.microsoft.com/en-us/library/windows/desktop/ms632650.aspx). – IInspectable Aug 13 '15 at 11:45

1 Answers1

0

Call IsThemeActive to detect whether or not your application is subject to themes. Note that this may differ from the system-wide setting because it is possible to force individual processes to run without themes enabled, even when the system has themes active.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Thank you for this. I tried it and it worked correctly, but how to differentiate windows 7 basic theme and windows 7 aero themes. It shows both has visual styles enabled. Is any way to differentiate them – Rakesh Kumar Aug 13 '15 at 11:45
  • OK, I've found a duplicate whose accepted answer has what you need – David Heffernan Aug 13 '15 at 11:48