aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-04-02 12:39:47 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-04-02 12:44:31 +0200
commit7e52a92bac667723885f689a1310d93144bd6a11 (patch)
tree1e284297c026e56e68982ac4fecdb27455c17fba /c
parente9978f8d1c1acd2e51a64ad5dbe936417fd094d5 (diff)
downloadEpisodeBrowser-7e52a92bac667723885f689a1310d93144bd6a11.tar.gz
Properly hide focus rectangles.
For some reason, UISF_HIDEFOCUS must not be set for the main window.
Diffstat (limited to 'c')
-rw-r--r--c/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/c/main.c b/c/main.c
index 3906383..2adb2f2 100644
--- a/c/main.c
+++ b/c/main.c
@@ -336,7 +336,7 @@ UpdateTheme()
HMODULE hModule;
hModule = LoadLibrary(TEXT("uxtheme.dll"));
bThemes = hModule && GetProcAddress(hModule,"SetWindowTheme");
- FreeLibrary(hModule);
+ if (hModule) FreeLibrary(hModule);
}
if (!bThemes) return;
@@ -359,5 +359,6 @@ UpdateTheme()
ListView_SetExtendedListViewStyleEx(HDlv, LVS_EX_DOUBLEBUFFER, dwStyle);
/* Hide focus rectangles. */
- SendMessage(HWnd, WM_UPDATEUISTATE, MAKEWPARAM(wAction, UISF_HIDEFOCUS), 0);
+ SendMessage(HElv, WM_UPDATEUISTATE, MAKEWPARAM(wAction, UISF_HIDEFOCUS), 0);
+ SendMessage(HDlv, WM_UPDATEUISTATE, MAKEWPARAM(wAction, UISF_HIDEFOCUS), 0);
}