aboutsummaryrefslogtreecommitdiff
path: root/c/listview.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-02-16 18:09:04 +0100
committerJohn Ankarström <john@ankarstrom.se>2022-02-16 18:25:50 +0100
commit2a726875d7ab370966bbb4b6ebb41756fc17f729 (patch)
tree1cc9da9c70a994aa43287088cdfbc2a5d38606b9 /c/listview.c
parent7086bfe3e7bf04dd61f16216c659fc5534c2796a (diff)
downloadEpisodeBrowser-2a726875d7ab370966bbb4b6ebb41756fc17f729.tar.gz
Clean up.
Diffstat (limited to 'c/listview.c')
-rw-r--r--c/listview.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/c/listview.c b/c/listview.c
index 66bcc29..956e646 100644
--- a/c/listview.c
+++ b/c/listview.c
@@ -6,18 +6,16 @@
#include "defs.h"
extern HFONT g_GUIFont;
-
-WNDPROC g_PrevLvProc;
-
+WNDPROC Lv_PrevProc;
static LRESULT CALLBACK LvProc(HWND, UINT, WPARAM, LPARAM);
HWND
LvCreate(HWND hWnd, HMENU hMenu)
{
HMODULE hModule;
- HWND hListView;
+ HWND hLv;
- hListView = CreateWindowEx(
+ hLv = CreateWindowEx(
WS_EX_CLIENTEDGE,
WC_LISTVIEW,
TEXT(""),
@@ -29,40 +27,39 @@ LvCreate(HWND hWnd, HMENU hMenu)
NULL
);
- g_PrevLvProc = (WNDPROC)SetWindowLongPtr(hListView,
+ Lv_PrevProc = (WNDPROC)SetWindowLongPtr(hLv,
GWLP_WNDPROC, (LONG_PTR)LvProc);
- ListView_SetExtendedListViewStyle(hListView,
+ ListView_SetExtendedListViewStyle(hLv,
LVS_EX_DOUBLEBUFFER);
- SendMessage(hListView, WM_SETFONT,
+ SendMessage(hLv, WM_SETFONT,
(WPARAM)g_GUIFont, MAKELPARAM(FALSE, 0));
hModule = LoadLibrary(TEXT("uxtheme.dll"));
if (hModule && GetProcAddress(hModule, "SetWindowTheme")) {
- ListView_SetExtendedListViewStyle(hListView,
+ ListView_SetExtendedListViewStyle(hLv,
LVS_EX_FULLROWSELECT|LVS_EX_DOUBLEBUFFER);
- SendMessage(hListView, WM_CHANGEUISTATE,
+ SendMessage(hLv, WM_CHANGEUISTATE,
MAKEWPARAM(UIS_SET, UISF_HIDEFOCUS), 0);
- SetWindowTheme(hListView, TEXT("Explorer"), NULL);
+ SetWindowTheme(hLv, TEXT("Explorer"), NULL);
}
- return hListView;
+ return hLv;
}
LRESULT CALLBACK
-LvProc(HWND hListView, UINT uMsg, WPARAM wParam, LPARAM lParam)
+LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg) {
case WM_NOTIFY:
switch (((NMHDR *)lParam)->code) {
case HDN_ENDTRACK:
- UpdateLayout(GetParent(hListView));
+ UpdateLayout(GetParent(hLv));
return TRUE;
}
break;
}
- return CallWindowProc(g_PrevLvProc,
- hListView, uMsg, wParam, lParam);
+ return CallWindowProc(Lv_PrevProc, hLv, uMsg, wParam, lParam);
}