3
如何在C#.NET或C++ Win32中禁用Aero效果?在C#/ VB.NET或C++中啓用/禁用Aero Win32
這是C/C++我的測試代碼,但只工作,如果我的應用程序運行過程中出現
#include <dwmapi.h>
int main()
{
DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);
while(true);
//...
return 0;
}
//LINK dwmapi.lib
感謝
編輯:我想通了
#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;
}
//Memory: 314KB
//CPU: 0%
你想永久tly禁用它們爲用戶? – 2010-10-18 18:23:46
你想做什麼? – SLaks 2010-10-18 18:25:08