From 12176831abde1f4545fae95ee9edd5688f8cc584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 4 Apr 2022 01:20:30 +0200 Subject: Remove column headers from data list view. --- c/listview.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'c/listview.c') diff --git a/c/listview.c b/c/listview.c index e357905..868ab9e 100644 --- a/c/listview.c +++ b/c/listview.c @@ -11,7 +11,7 @@ WNDPROC LvPrevProc; static LRESULT CALLBACK LvProc(HWND, UINT, WPARAM, LPARAM); HWND -LvCreate(HMENU hMenu) +LvCreate(HMENU hMenu, DWORD dwStyle) { HWND hLv; @@ -19,7 +19,7 @@ LvCreate(HMENU hMenu) WS_EX_CLIENTEDGE, WC_LISTVIEW, TEXT(""), - WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP + dwStyle|WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP |LVS_REPORT|LVS_NOSORTHEADER|LVS_SHOWSELALWAYS, 0, 0, 0, 0, HWnd, hMenu, GetModuleHandle(NULL), NULL @@ -70,10 +70,9 @@ LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam) /* Naively calculate height of list view. */ int -LvHeight(HWND hLv) +LvHeight(HWND hLv, int bHeader) { int iCount; iCount = ListView_GetItemCount(hLv); - return iCount? Dpi(27)+iCount*Dpi(19): 0; + return iCount? Dpi(bHeader? 27: 3)+iCount*Dpi(19): 0; } - -- cgit v1.2.3