Determines whether Desktop Window Manager (DWM) composition is enabled
#include <WinAPIGdi.au3>
_WinAPI_DwmIsCompositionEnabled ( )
Success: | 1 - DWM composition is enabled. 0 - Otherwise. |
Failure: | 0 and sets the @error flag to non-zero, @extended flag may contain the HRESULT error code. |
This function requires Windows Vista or later.
Search DwmIsCompositionEnabled in MSDN Library.
#include <MsgBoxConstants.au3>
#include <WinAPIGdi.au3>
#include <WinAPISys.au3>
If Number(_WinAPI_GetVersion()) < 6.0 Then
MsgBox(($MB_ICONERROR + $MB_SYSTEMMODAL), 'Error', 'Require Windows Vista or later.')
Exit
EndIf
Local $aState[2] = ['Disabled', 'Enabled']
ConsoleWrite('Aero is: ' & $aState[_WinAPI_DwmIsCompositionEnabled()] & @CRLF)