From 1fb3298e7bebf2b5c390b68a216051c2ee2c1b65 Mon Sep 17 00:00:00 2001 From: James Hatheway Date: Sat, 8 Jul 2000 12:45:21 +0000 Subject: [PATCH] Only use the column headers to calculate the width of a LDS_REPORT-type listbox if it actually has column headers. (ie. LVS_NOCOLUMNHEADER bit is not set.) --- dlls/comctl32/listview.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 7aabd7a31af..41272087cef 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -813,7 +813,8 @@ static LISTVIEW_SUBITEM* LISTVIEW_GetSubItemPtr(HDPA hdpaSubItems, static INT LISTVIEW_GetItemWidth(HWND hwnd) { LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0); - UINT uView = GetWindowLongA(hwnd, GWL_STYLE) & LVS_TYPEMASK; + LONG style = GetWindowLongA(hwnd, GWL_STYLE); + UINT uView = style & LVS_TYPEMASK; INT nHeaderItemCount; RECT rcHeaderItem; INT nItemWidth = 0; @@ -826,7 +827,7 @@ static INT LISTVIEW_GetItemWidth(HWND hwnd) { nItemWidth = infoPtr->iconSpacing.cx; } - else if (uView == LVS_REPORT) + else if (uView == LVS_REPORT && (!(LVS_NOCOLUMNHEADER & style)) ) { /* calculate width of header */ nHeaderItemCount = Header_GetItemCount(infoPtr->hwndHeader); -- 2.11.4.GIT