[ros-diffs] [gschneider] 37661: - ExtCreatePen creates a PS_NULL style pen in the LOGPEN Format, use the NULL_PEN StockObject for that matter - Fixes 24 gdi32 pen winetests

gschneider at svn.reactos.org gschneider at svn.reactos.org
Wed Nov 26 16:12:39 CET 2008


Author: gschneider
Date: Wed Nov 26 09:12:38 2008
New Revision: 37661

URL: http://svn.reactos.org/svn/reactos?rev=37661&view=rev
Log:
- ExtCreatePen creates a PS_NULL style pen in the LOGPEN Format, use the NULL_PEN StockObject for that matter
- Fixes 24 gdi32 pen winetests

Modified:
    trunk/reactos/subsystems/win32/win32k/objects/pen.c

Modified: trunk/reactos/subsystems/win32/win32k/objects/pen.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/pen.c?rev=37661&r1=37660&r2=37661&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/pen.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/pen.c [iso-8859-1] Wed Nov 26 09:12:38 2008
@@ -369,17 +369,25 @@
       }
    }
 
-   hPen = IntGdiExtCreatePen(dwPenStyle,
-                             ulWidth,
-                             ulBrushStyle,
-                             ulColor,
-                             ulClientHatch,
-                             ulHatch,
-                             dwStyleCount,
-                             pSafeStyle,
-                             cjDIB,
-                             bOldStylePen,
-                             hBrush);
+   if (dwPenStyle != PS_NULL)
+   {
+      hPen = IntGdiExtCreatePen(dwPenStyle,
+                                ulWidth,
+                                ulBrushStyle,
+                                ulColor,
+                                ulClientHatch,
+                                ulHatch,
+                                dwStyleCount,
+                                pSafeStyle,
+                                cjDIB,
+                                bOldStylePen,
+                                hBrush);
+   }
+   else
+   {
+      hPen = NtGdiGetStockObject(NULL_PEN);
+   }
+
    if (!hPen && pSafeStyle)
    {
       ExFreePoolWithTag(pSafeStyle, TAG_PENSTYLES);



More information about the Ros-diffs mailing list