aboutsummaryrefslogtreecommitdiff
path: root/c/listview.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/listview.c')
-rw-r--r--c/listview.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/c/listview.c b/c/listview.c
index 82c6459..a528e44 100644
--- a/c/listview.c
+++ b/c/listview.c
@@ -69,6 +69,15 @@ LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam)
return CallWindowProc(LvPrevProc, hLv, uMsg, wParam, lParam);
}
+/* Naively calculate height of list view. */
+int
+LvHeight(HWND hLv)
+{
+ int iCount;
+ iCount = ListView_GetItemCount(hLv);
+ return iCount? 27+iCount*19: 0;
+}
+
/* Enable/disable non-classic list view theme. */
void
LvSetTheme(HWND hLv, int bUseTheme)