It works fine for me by code on Windows 10 :
// Call SetWindowCompositionAttribute with ACCENT_ENABLE_BLURBEHIND => Background = transparent
// ...
// Reset Taskbar :
// Call SetWindowCompositionAttribute with ACCENT_DISABLED => Background = Black
// Then to reset original color (Accent color) :
HKEY hKey;
DWORD dwSize;
LONG nResult;
if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"), 0, KEY_READ | KEY_WRITE, &hKey) == ERROR_SUCCESS)
{
DWORD nTransparencyOrig = 0;
dwSize = sizeof(nTransparencyOrig);
nResult = RegQueryValueEx(hKey, TEXT("EnableTransparency"), 0, NULL, (LPBYTE)&nTransparencyOrig, (LPDWORD)&dwSize);
if (nResult == ERROR_SUCCESS)
{
DWORD nTransparency = (nTransparencyOrig == 0)?1:0;
nResult = RegSetValueEx(hKey, TEXT("EnableTransparency"), 0, REG_DWORD, (LPBYTE)&nTransparency, sizeof(nTransparency));
//SendNotifyMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"ImmersiveColorSet");
RegSetValueEx(hKey, TEXT("EnableTransparency"), 0, REG_DWORD, (LPBYTE)&nTransparency, sizeof(nTransparency));
//SendNotifyMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"ImmersiveColorSet");
RegCloseKey(hKey);
}
}