Corrected method of creating registry keys, both to fix an issue where
they were not created and to act more like Windows.
This commit is contained in:
parent
187c8b71ce
commit
0fd8e51365
|
@ -161,7 +161,6 @@ HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
|
|||
szCurrentTheme[0] = '\0';
|
||||
szCurrentColor[0] = '\0';
|
||||
szCurrentSize[0] = '\0';
|
||||
return MSSTYLES_SetActiveTheme(NULL);
|
||||
}
|
||||
|
||||
TRACE("Writing theme config to registry\n");
|
||||
|
@ -169,9 +168,17 @@ HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
|
|||
tmp[0] = bThemeActive?'1':'0';
|
||||
tmp[1] = '\0';
|
||||
RegSetValueExW(hKey, szThemeActive, 0, REG_SZ, (const BYTE*)tmp, sizeof(WCHAR)*2);
|
||||
RegSetValueExW(hKey, szColorName, 0, REG_SZ, (const BYTE*)szCurrentColor, lstrlenW(szCurrentColor)+1);
|
||||
RegSetValueExW(hKey, szSizeName, 0, REG_SZ, (const BYTE*)szCurrentSize, lstrlenW(szCurrentSize)+1);
|
||||
RegSetValueExW(hKey, szDllName, 0, REG_SZ, (const BYTE*)szCurrentTheme, lstrlenW(szCurrentTheme)+1);
|
||||
if(bThemeActive) {
|
||||
RegSetValueExW(hKey, szColorName, 0, REG_SZ, (const BYTE*)szCurrentColor, lstrlenW(szCurrentColor)+1);
|
||||
RegSetValueExW(hKey, szSizeName, 0, REG_SZ, (const BYTE*)szCurrentSize, lstrlenW(szCurrentSize)+1);
|
||||
RegSetValueExW(hKey, szDllName, 0, REG_SZ, (const BYTE*)szCurrentTheme, lstrlenW(szCurrentTheme)+1);
|
||||
}
|
||||
else {
|
||||
RegDeleteValueW(hKey, szColorName);
|
||||
RegDeleteValueW(hKey, szSizeName);
|
||||
RegDeleteValueW(hKey, szDllName);
|
||||
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue