DwmEnableComposition does not allow Aero

I am trying to enable Aero for my application (the Firefox plugin launches a "single process" with a browser), but I cannot do this. OS - 64-bit Windows 7.

This is the code:

BOOL bEnabled = FALSE;
if(SUCCEEDED(DwmIsCompositionEnabled(&bEnabled)) && !bEnabled){         
    HRESULT hres = DwmEnableComposition(DWM_EC_ENABLECOMPOSITION);
}

DwmEnableComposition should include composition, but it is not, the function also returns:

S_OK

Any help would be appreciated, thanks!

+3
source share
2 answers

You cannot enable DWM composition; you can only request to disable it. When you need it to be turned off, you call

DwmEnableComposition(DWM_EC_ENABLECOMPOSITION);

From MSDN:

A DWM composition will be automatically activated when all processes that have a composition disabled have called DwmEnableComposition to enable it or have stopped it.

, , . (, Microsoft , , , .)

, . MSDN:

, Windows 8 Consumer Preview. DWM .

+4

DwmEnableComposition() , . - Windows , , DWM.

, , , .

+2

All Articles