How to disable aero effects in C # .NET or C ++ Win32 ???
This is my test code in C / C ++, but only works if my application is running
#include <dwmapi.h>
int main()
{
DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);
while(true);
return 0;
}
thank
Edit: I figured it out
#include <Windows.h>
#include <dwmapi.h>
int WINAPI WinMain(HINSTANCE hI, HINSTANCE hP, PSTR str, int c)
{
DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);
MSG msg;
ZeroMemory(&msg, sizeof(MSG));
while(GetMessage(&msg, 0, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}
source
share