aboutsummaryrefslogtreecommitdiff
path: root/c/listview.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-02-18 20:25:42 +0100
committerJohn Ankarström <john@ankarstrom.se>2022-02-18 20:25:42 +0100
commit74a6d0f006b9e0ca6167a5a021e0789aa8ac2a07 (patch)
treee9210118b3d4ddfafd2965023a90ef9249984a47 /c/listview.c
parent6722589a74abb76b8aaff9ba592c5608b024dbde (diff)
downloadEpisodeBrowser-74a6d0f006b9e0ca6167a5a021e0789aa8ac2a07.tar.gz
Resize data list view depending on number of items.
Diffstat (limited to 'c/listview.c')
-rw-r--r--c/listview.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/c/listview.c b/c/listview.c
index e37b280..48b61e1 100644
--- a/c/listview.c
+++ b/c/listview.c
@@ -28,16 +28,15 @@ LvCreate(HMENU hMenu)
LvPrevProc = (WNDPROC)SetWindowLongPtr(hLv,
GWLP_WNDPROC, (LONG_PTR)LvProc);
- ListView_SetExtendedListViewStyleEx(hLv,
- LVS_EX_DOUBLEBUFFER, LVS_EX_DOUBLEBUFFER);
+ ListView_SetExtendedListViewStyle(hLv, LVS_EX_FULLROWSELECT);
SendMessage(hLv, WM_SETFONT,
(WPARAM)HfNormal, MAKELPARAM(FALSE, 0));
hModule = LoadLibrary(TEXT("uxtheme.dll"));
if (hModule && GetProcAddress(hModule, "SetWindowTheme")) {
- ListView_SetExtendedListViewStyle(hLv,
- LVS_EX_FULLROWSELECT|LVS_EX_DOUBLEBUFFER);
+ ListView_SetExtendedListViewStyleEx(hLv,
+ LVS_EX_DOUBLEBUFFER, LVS_EX_DOUBLEBUFFER);
SendMessage(hLv, WM_CHANGEUISTATE,
MAKEWPARAM(UIS_SET, UISF_HIDEFOCUS), 0);
SetWindowTheme(hLv, TEXT("Explorer"), NULL);
@@ -53,7 +52,7 @@ LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
case HDN_ENDTRACK:
- UpdateLayout(GetParent(hLv));
+ UpdateLayout();
return TRUE;
}
break;