DwmIsCompositionEnabled Function

Obtains a value that indicates whether Desktop Window Manager (DWM) composition is enabled. Applications can listen for composition state changes by handling the WM_DWMCOMPOSITIONCHANGED notification.

Syntax

HRESULT DwmIsCompositionEnabled(      
    BOOL *pfEnabled );

Parameters

pfEnabled
[out] A pointer to a BOOL that receives TRUE if DWM composition is enabled; otherwise, FALSE.

Return Value

Returns S_OK if successful, or an error value otherwise.

Function Information

Minimum DLL Versiondwmapi.dll
Headerdwmapi.h
Import librarydwmapi.lib
Minimum operating systems Windows Vista
Tags :


Community Content

tehnolog
Sample for C#

//Alexander Klimoff (http://netsources.narod.ru)

// See also MSDN Magazine April 2007

[DllImport("dwmapi.dll", PreserveSig = false)]
public static extern bool DwmIsCompositionEnabled();

// Check to see if composition is Enabled
if (DwmIsCompositionEnabled())
{
MessageBox.Show("Aero Glass enabled");
}
else
{
MessageBox.Show("Aero Glass disabled");

}

Tags :

Page view tracker