diff options
author | John Ankarström <john@ankarstrom.se> | 2022-02-17 01:48:22 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-02-17 01:48:22 +0100 |
commit | d7cf090cee5f1b71c3e9c5f232d0e2a51ad6a7e5 (patch) | |
tree | 1b803ac1d172556422455c6822a7702202409eb5 /c/listview.c | |
parent | 263bc8b8ff4296a1fe0014a26134ad35ebccbbff (diff) | |
download | EpisodeBrowser-d7cf090cee5f1b71c3e9c5f232d0e2a51ad6a7e5.tar.gz |
More cleanup.
Diffstat (limited to 'c/listview.c')
-rw-r--r-- | c/listview.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/c/listview.c b/c/listview.c index d223951..5bc76ce 100644 --- a/c/listview.c +++ b/c/listview.c @@ -5,12 +5,13 @@ #include "resource.h" #include "defs.h" -extern HFONT g_GUIFont; -WNDPROC Lv_PrevProc; +extern HFONT HfNormal; +extern HWND HWnd; +WNDPROC LvPrevProc; static LRESULT CALLBACK LvProc(HWND, UINT, WPARAM, LPARAM); HWND -LvCreate(HWND hWnd, HMENU hMenu) +LvCreate(HMENU hMenu) { HMODULE hModule; HWND hLv; @@ -21,20 +22,20 @@ LvCreate(HWND hWnd, HMENU hMenu) TEXT(""), WS_CHILD|WS_VISIBLE|WS_VSCROLL|LVS_REPORT|LVS_NOSORTHEADER, 0, 0, 0, 0, - hWnd, + HWnd, hMenu, GetModuleHandle(NULL), NULL ); - Lv_PrevProc = (WNDPROC)SetWindowLongPtr(hLv, + LvPrevProc = (WNDPROC)SetWindowLongPtr(hLv, GWLP_WNDPROC, (LONG_PTR)LvProc); - ListView_SetExtendedListViewStyle(hLv, - LVS_EX_DOUBLEBUFFER); + ListView_SetExtendedListViewStyleEx(hLv, + LVS_EX_DOUBLEBUFFER, LVS_EX_DOUBLEBUFFER); SendMessage(hLv, WM_SETFONT, - (WPARAM)g_GUIFont, MAKELPARAM(FALSE, 0)); + (WPARAM)HfNormal, MAKELPARAM(FALSE, 0)); hModule = LoadLibrary(TEXT("uxtheme.dll")); if (hModule && GetProcAddress(hModule, "SetWindowTheme")) { @@ -61,5 +62,5 @@ LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam) break; } - return CallWindowProc(Lv_PrevProc, hLv, uMsg, wParam, lParam); + return CallWindowProc(LvPrevProc, hLv, uMsg, wParam, lParam); } |