且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

获取Windows主题?

更新时间:2023-01-27 11:30:30

您可以检查主题是否处于活动状态调用的 IsAppThemed /的 IsThemeActive ,然后通过调用的 DwmIsCompositionEnabled 。有可能是这样做的其他方式!

You can check whether themes are active by calling IsAppThemed/IsThemeActive and then check for Aero by calling DwmIsCompositionEnabled. There may well be other ways of doing this!!

修改

的逻辑是:

  1. 我可以导入 IsAppThemed IsThemeActive ?如果没有那我一定是在Windows经典(Win9x的或Win2k的)。
  2. 这是什么 IsAppThemed和IsThemeActive 返回?如果为假,则我必须在Windows经典。
  3. 我可以导入 DwmIsCompositionEnabled ?如果没有那我一定是XP的主题。
  4. 这是什么 DwmIsCompositionEnabled 的回报?如果为真,那么我是航空,不然我的Windows基础。
  1. Can I import IsAppThemed and IsThemeActive? If no then I must be in Windows Classic (Win9x or Win2k).
  2. What does IsAppThemed and IsThemeActive return? If false then I must be in Windows Classic.
  3. Can I import DwmIsCompositionEnabled? If no then I must be XP themed.
  4. What does DwmIsCompositionEnabled return? If true then I am Aero, otherwise I am Windows Basic.