From 2796763ee3ef87904fd92f4f753c138a1be295bd Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 26 Apr 2009 12:38:01 +0400 Subject: [PATCH] comctl32/listview: Draw rightmost vertical grid line when needed. --- dlls/comctl32/listview.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 38c51331ddb..8808165e2ae 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4152,6 +4152,7 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) POINT Origin; RANGE colRange; ITERATOR j; + BOOL rmost; TRACE("()\n"); @@ -4173,6 +4174,9 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) LISTVIEW_GetHeaderRect(infoPtr, colRange.upper - 1, &rcItem); if (rcItem.left + Origin.x < rcClip.right) break; } + /* is right most vertical line visible? */ + LISTVIEW_GetHeaderRect(infoPtr, DPA_GetPtrCount(infoPtr->hdpaColumns) - 1, &rcItem); + rmost = (rcItem.right + Origin.x < rcClip.right); if ((hPen = CreatePen( PS_SOLID, 1, comctl32_color.clr3dFace ))) { @@ -4193,6 +4197,12 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) LineTo (hdc, rcItem.left, rcItem.bottom); } iterator_destroy(&j); + /* draw rightmost grid line if visible */ + if (rmost) + { + MoveToEx (hdc, rcItem.right, rcItem.top, NULL); + LineTo (hdc, rcItem.right, rcItem.bottom); + } /* draw the horizontial lines for the rows */ itemheight = LISTVIEW_CalculateItemHeight(infoPtr);