- ExtCreatePen creates a PS_NULL style pen in the LOGPEN Format, use the NULL_PEN...
authorGregor Schneider <grschneider@gmail.com>
Wed, 26 Nov 2008 15:12:38 +0000 (15:12 +0000)
committerGregor Schneider <grschneider@gmail.com>
Wed, 26 Nov 2008 15:12:38 +0000 (15:12 +0000)
- Fixes 24 gdi32 pen winetests

svn path=/trunk/; revision=37661

reactos/subsystems/win32/win32k/objects/pen.c

index 8ade40f..4ea44ae 100644 (file)
@@ -369,17 +369,25 @@ NtGdiExtCreatePen(
       }
    }
 
-   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);