From 4ec130efd5131f7cf2c48a1625291efdd522e048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 31 Mar 2022 00:24:52 +0200 Subject: Set minimum window height. --- c/listview.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'c/listview.c') 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) -- cgit v1.2.3