[3/5] comctl32/listview: Draw rightmost vertical grid line when needed
Nikolay Sivov
bunglehead at gmail.com
Sun Apr 26 04:03:46 CDT 2009
Currently no grid line is drawn at right side of rightmost column.
Changelog:
- Draw rightmost vertical grid line when needed
>From d68c45da39e5a69b520b087141cb3e77256a1a1d Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Sun, 26 Apr 2009 12:38:01 +0400
Subject: Draw rightmost vertical grid line when needed
---
dlls/comctl32/listview.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 38c5133..8808165 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);
--
1.5.6.5
More information about the wine-patches
mailing list