diff options
Diffstat (limited to 'c/main.c')
-rw-r--r-- | c/main.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -302,15 +302,19 @@ UpdateTheme() { int bThemeActive; extern HWND HElv, HDlv; - static int bTheming = -1; + static int bThemes = -1; - if (bTheming == -1) { + switch (bThemes) { + case -1: + { HMODULE hModule; hModule = LoadLibrary(TEXT("uxtheme.dll")); - bTheming = hModule && GetProcAddress(hModule,"SetWindowTheme"); + bThemes = hModule && GetProcAddress(hModule,"SetWindowTheme"); + break; + } + case 1: + bThemeActive = IsThemeActive(); + LvSetTheme(HElv, bThemeActive); + LvSetTheme(HDlv, bThemeActive); } - if (!bTheming) return; - bThemeActive = IsThemeActive(); - LvSetTheme(HElv, bThemeActive); - LvSetTheme(HDlv, bThemeActive); } |