-
-
Save plutocracy/f769a8f9c8395ba9d6ee917a39570f86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
void SetWindowBlur(HWND hWnd) | |
{ | |
const HINSTANCE hModule = LoadLibrary(TEXT("user32.dll")); | |
if (hModule) | |
{ | |
struct ACCENTPOLICY | |
{ | |
int nAccentState; | |
int nFlags; | |
int nColor; | |
int nAnimationId; | |
}; | |
struct WINCOMPATTRDATA | |
{ | |
int nAttribute; | |
PVOID pData; | |
ULONG ulDataSize; | |
}; | |
typedef BOOL(WINAPI*pSetWindowCompositionAttribute)(HWND, WINCOMPATTRDATA*); | |
const pSetWindowCompositionAttribute SetWindowCompositionAttribute = (pSetWindowCompositionAttribute)GetProcAddress(hModule, "SetWindowCompositionAttribute"); | |
if (SetWindowCompositionAttribute) | |
{ | |
ACCENTPOLICY policy = { 4, 0, 0, 0 }; // 3=vaseline bullshit 4=no blur | |
WINCOMPATTRDATA data = { 19, &policy, sizeof(ACCENTPOLICY) }; // WCA_ACCENT_POLICY=19 | |
SetWindowCompositionAttribute(hWnd, &data); | |
} | |
FreeLibrary(hModule); | |
} | |
} | |
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPreInst, LPSTR pCmdLine, int nCmdShow) | |
{ | |
HWND taskbar = FindWindow(L"Shell_TrayWnd", NULL); | |
while (true) { | |
SetWindowBlur(taskbar); Sleep((DWORD)10); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment