diff options
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; } - |