aboutsummaryrefslogtreecommitdiff
path: root/c/listview.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/listview.c')
-rw-r--r--c/listview.c19
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);
}