Alexandre Julliard : comctl32: XOR'ing with a black pen is not useful.
Alexandre Julliard
julliard at winehq.org
Mon Sep 10 15:22:09 CDT 2012
Module: wine
Branch: master
Commit: 0e9c9772efdbaa3a6240a6eba8450580c48e2ab6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0e9c9772efdbaa3a6240a6eba8450580c48e2ab6
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sun Sep 9 11:59:51 2012 +0200
comctl32: XOR'ing with a black pen is not useful.
---
dlls/comctl32/header.c | 10 +---------
dlls/comctl32/listview.c | 10 ++--------
2 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index 0a40423..d1386e3 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -727,17 +727,9 @@ static void
HEADER_DrawTrackLine (const HEADER_INFO *infoPtr, HDC hdc, INT x)
{
RECT rect;
- HPEN hOldPen;
- INT oldRop;
GetClientRect (infoPtr->hwndSelf, &rect);
-
- hOldPen = SelectObject (hdc, GetStockObject (BLACK_PEN));
- oldRop = SetROP2 (hdc, R2_XORPEN);
- MoveToEx (hdc, x, rect.top, NULL);
- LineTo (hdc, x, rect.bottom);
- SetROP2 (hdc, oldRop);
- SelectObject (hdc, hOldPen);
+ PatBlt( hdc, x, rect.top, 1, rect.bottom - rect.top, DSTINVERT );
}
/***
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 3c9a0cb..b8e1ce3 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -9264,21 +9264,15 @@ static BOOL LISTVIEW_Update(LISTVIEW_INFO *infoPtr, INT nItem)
*/
static BOOL LISTVIEW_DrawTrackLine(const LISTVIEW_INFO *infoPtr)
{
- HPEN hOldPen;
HDC hdc;
- INT oldROP;
if (infoPtr->xTrackLine == -1)
return FALSE;
if (!(hdc = GetDC(infoPtr->hwndSelf)))
return FALSE;
- hOldPen = SelectObject(hdc, GetStockObject(BLACK_PEN));
- oldROP = SetROP2(hdc, R2_XORPEN);
- MoveToEx(hdc, infoPtr->xTrackLine, infoPtr->rcList.top, NULL);
- LineTo(hdc, infoPtr->xTrackLine, infoPtr->rcList.bottom);
- SetROP2(hdc, oldROP);
- SelectObject(hdc, hOldPen);
+ PatBlt( hdc, infoPtr->xTrackLine, infoPtr->rcList.top,
+ 1, infoPtr->rcList.bottom - infoPtr->rcList.top, DSTINVERT );
ReleaseDC(infoPtr->hwndSelf, hdc);
return TRUE;
}
More information about the wine-cvs
mailing list