- 
      
 - 
        
Save emmatyping/0e157e4003812e99bf5bc7cb6f73459f to your computer and use it in GitHub Desktop.  
| #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 = { 3, 0, 0, 0 }; // ACCENT_ENABLE_BLURBEHIND=3... | |
| 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); | |
| } | |
| } | 
@sadphi the L is a unicode macro. See https://msdn.microsoft.com/en-us/library/dybsewaf.aspx
Downloading your compiled exe from a link to your Google Drive reveals that it is infected with "Gen:Variant.Razy.110665".
What gives? Both Google and my own protection software catches it.
Probably a stupid question (I have pretty much no C++ experience), but why does your compiled exe make the taskbar completely transparent (and this code doesn't)? Also your image on Reddit shows a translucent taskbar, not a transparent one.
Rewritten for AutoHotkey: https://github.com/jNizM/AHK_Scripts/blob/master/src/others/SetWindowBlur.ahk
Is there a Chance to get the transparent taskbar on more than one monitor?
@morganrpugh I see, thanks
@Eweol For this information, follow my link I posted above =)
@jNizM I compiled your autohotkey script and it works for a few seconds before the script appears to crash.
Waiting for the v2 :D
So just exactly how would i instal this code? Does it come in a executable version?
A lot has happened since this was published. Please see https://github.com/TranslucentTB/TranslucentTB/ for more.
Ah I see. Thanks :)