[ros-diffs] [tkreuzer] 41651: Don't save/change/restore the DC pen in IntDrawScrollInterior, where it's not used at all.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sun Jun 28 10:32:30 CEST 2009


Author: tkreuzer
Date: Sun Jun 28 03:12:22 2009
New Revision: 41651

URL: http://svn.reactos.org/svn/reactos?rev=41651&view=rev
Log:
Don't save/change/restore the DC pen in IntDrawScrollInterior, where it's not used at all.

Modified:
    trunk/reactos/dll/win32/user32/controls/scrollbar.c

Modified: trunk/reactos/dll/win32/user32/controls/scrollbar.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/scrollbar.c?rev=41651&r1=41650&r2=41651&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] Sun Jun 28 03:12:22 2009
@@ -99,7 +99,6 @@
    INT ThumbSize = ScrollBarInfo->xyThumbBottom - ScrollBarInfo->xyThumbTop;
    INT ThumbTop = ScrollBarInfo->xyThumbTop;
    RECT Rect;
-   HPEN hSavePen;
    HBRUSH hSaveBrush, hBrush;
    BOOL TopSelected = FALSE, BottomSelected = FALSE;
 
@@ -124,7 +123,6 @@
       hBrush = DefWndControlColor(hDC, CTLCOLOR_SCROLLBAR);
    }
 
-   hSavePen = SelectObject(hDC, GetSysColorPen(COLOR_WINDOWFRAME));
    hSaveBrush = SelectObject(hDC, hBrush);
 
    /* Calculate the scroll rectangle */
@@ -150,7 +148,6 @@
          Rect.bottom - Rect.top, PATCOPY);
 
       /* Cleanup and return */
-      SelectObject(hDC, hSavePen);
       SelectObject(hDC, hSaveBrush);
       return;
    }
@@ -207,7 +204,6 @@
       DrawEdge(hDC, &Rect, EDGE_RAISED, BF_RECT | BF_MIDDLE);
 
    /* Cleanup */
-   SelectObject(hDC, hSavePen);
    SelectObject(hDC, hSaveBrush);
 }
 



More information about the Ros-diffs mailing list