5

According to Enable and Control DWM Composition:

Note As of Windows 8, the information in this section is no longer valid. DWM can no longer be programmatically disabled, nor is it disabled when an application attempts to draw to the primary display surface. The following information applies to only Windows 7 and earlier systems.

OK. So we can no longer programmatically disable DWM. But can it still be disabled? Will pfEnabled of DwmIsCompositionEnabled always be set to TRUE on Windows 8?

If composition can be disabled somehow, is DwmIsCompositionEnabled still somewhat useful in any manner?

2
  • There couldn't be any Store apps without DWM. I don't get the point of the question, you are going to write code that can only run on Win8 but not on Win7? That's a bit unwise. Dec 12, 2012 at 3:37
  • 2
    What makes you think that? My app does custom painting on Vista/7 dependent on the DWM state so I simply want to know whether DwmIsCompositionEnabled always returns true on Windows >= 8. Dec 12, 2012 at 4:34

2 Answers 2

8

According to Desktop Window Manager is always on (Windows) on MSDN:

In Windows 8, Desktop Window Manager (DWM) is always ON and cannot be disabled by end users and apps.

In Windows 8, DWM desktop composition is a core operating system component and cannot be disabled. With a few exceptions, desktop composition is always on; it’s started before the user logon and remains active for the duration of a session.

All of the options for disabling desktop composition that exist in Window 7 are removed

Apps cannot use DwmEnableComposition to disable desktop composition. In order to maintain backward compatibility, a call to this API will return success; however, desktop composition is not disabled

Well, there's a pretty definitive answer. I'm somewhat curious what the "with a few exceptions" refers to, though... please add a comment if you happen to know. :)

3

Contrary to what people mention ("they removed the code", "the Basic theme is no longer there", etc.) the old visual style is alive and well in Windows 8.

The only problem is that it's not so clear how to use it for normal applications!

This isn't disabling DWM per se, but it is certainly disabling composition: just download the PowerToy Calculator for Windows XP and try running it in compatibility mode in Windows 8, and you'll see the old theme is still there:

1
  • 1
    Technically, any application can set the DWM non-client rendering policy to disabled with the DwmSetWindowAttribute method, then the basic theme reappears instead of glass. However, afaik that doesn't change what IsCompositionEnabled returns as that is the global system state and not the one of the application.
    – Ray
    Oct 31, 2014 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.