diff options
author | John Ankarström <john@ankarstrom.se> | 2022-04-04 01:20:30 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-04-04 01:20:30 +0200 |
commit | 12176831abde1f4545fae95ee9edd5688f8cc584 (patch) | |
tree | 4591be39e96b4deb4f45072808be48724e84108e /c/listview.c | |
parent | d77a1f32a0ea391628a6c43dcfe02f648f1ae488 (diff) | |
download | EpisodeBrowser-12176831abde1f4545fae95ee9edd5688f8cc584.tar.gz |
Remove column headers from data list view.
Diffstat (limited to 'c/listview.c')
-rw-r--r-- | c/listview.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; } - |