MCPcopy Create free account
hub / github.com/LegacyUpdate/LegacyUpdate / GetTheme

Function GetTheme

nsisplugin/DialogInit.c:73–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71static HWND g_backgroundWindow;
72
73static Theme GetTheme(void) {
74 BOOL enabled = FALSE;
75 if (!$DwmIsCompositionEnabled || !$IsThemeActive || !SUCCEEDED($DwmIsCompositionEnabled(&enabled))) {
76 return ThemeClassic;
77 }
78
79 if (enabled) {
80 DWORD light = 1;
81 if (AtLeastWin10_1809()) {
82 GetRegistryDword(HKEY_CURRENT_USER, REGPATH_WIN_PERSONALIZE, L"AppsUseLightTheme", 0, &light);
83 }
84 return light ? ThemeAeroLight : ThemeAeroDark;
85 }
86
87 return $IsThemeActive() ? ThemeBasic : ThemeClassic;
88}
89
90static void ConfigureWindow(void) {
91 HWND bannerWindow = GetDlgItem(g_hwndParent, 1046);

Callers 1

ConfigureWindowFunction · 0.85

Calls 1

GetRegistryDwordFunction · 0.85

Tested by

no test coverage detected