aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to 'c')
-rw-r--r--c/main.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/c/main.c b/c/main.c
index 6f317eb..eac223a 100644
--- a/c/main.c
+++ b/c/main.c
@@ -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);
}