{"id":10563,"date":"2011-05-26T07:00:00","date_gmt":"2011-05-26T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2011\/05\/26\/how-do-isthemeactive-isappthemed-and-iscompositionactive-differ\/"},"modified":"2011-05-26T07:00:00","modified_gmt":"2011-05-26T07:00:00","slug":"how-do-isthemeactive-isappthemed-and-iscompositionactive-differ","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20110526-00\/?p=10563","title":{"rendered":"How do IsThemeActive, IsAppThemed, and IsCompositionActive differ?"},"content":{"rendered":"<p>There are three functions which test very similar things, and sometimes applications pick the wrong one. Here&#8217;s the rundown:<\/p>\n<ul>\n<li><code>IsThemeActive<\/code> checks whether visual styles     are enabled for the user.     This is not an application-specific setting; it tells you     whether visual styles are enabled in general.     Note that this does not tell you whether the current     application is using visual styles. <\/li>\n<li><code>IsAppThemed<\/code> checks whether visual styles     are enabled for the current application.     Windows may disable visual styles for a specific application     (even though they are enabled in general)     for compatiblity reasons. <\/li>\n<li><code>IsCompositionActive<\/code> checks whether desktop     composition is enabled for the current application.     As with visual styles,     Windows may disable desktop composition for a specific application     (even though it is enabled in general)     for compatiblity reasons. <\/li>\n<\/ul>\n<p> Note that these functions do not answer the question &#8220;Is the application using the visual-styles-enabled version of the common controls library?&#8221; That question is harder to answer because the decision to use the visual-styles-enabled version of the common controls library is not a process-wide one but is rather made on a window-by-window basis. You can have an application where half of the button controls are the old non-visual-styles version and half of the button controls participate in visual styles. (You may have seen this in action in Explorer, where the OK button on the <i>Run<\/i> dialog participates in visual styles, yet a button in a shell extension does not.)\n How can you tell whether a particular button is an old-school button or a fancy new button? I don&#8217;t know either.<\/p>\n<p> <b>Bonus emphasis<\/b>: From the comments, it appears that people have confused &#8220;a window was created with the visual-styles-enabled version of the common controls library&#8221; with &#8220;themes are enabled&#8221;. The two are independent concepts. All four combinations are possible. I thought I called this out in the article, but apparently I didn&#8217;t call it out clearly enough. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are three functions which test very similar things, and sometimes applications pick the wrong one. Here&#8217;s the rundown: IsThemeActive checks whether visual styles are enabled for the user. This is not an application-specific setting; it tells you whether visual styles are enabled in general. Note that this does not tell you whether the current [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-10563","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>There are three functions which test very similar things, and sometimes applications pick the wrong one. Here&#8217;s the rundown: IsThemeActive checks whether visual styles are enabled for the user. This is not an application-specific setting; it tells you whether visual styles are enabled in general. Note that this does not tell you whether the current [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/10563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=10563"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/10563\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=10563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=10563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=10563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}