sync to trunk (44770)
[reactos.git] / reactos / dll / win32 / gdi32 / objects / region.c
index 133b87a..3fb2559 100644 (file)
@@ -201,7 +201,7 @@ HRGN
 WINAPI
 CreatePolygonRgn( const POINT * lppt, int cPoints, int fnPolyFillMode)
 {
-    return (HRGN) NtGdiPolyPolyDraw( (HDC) fnPolyFillMode, (PPOINT) lppt, (PULONG) &cPoints, 1, GdiPolyPolyRgn);
+    return (HRGN) NtGdiPolyPolyDraw( ULongToHandle(fnPolyFillMode), (PPOINT) lppt, (PULONG) &cPoints, 1, GdiPolyPolyRgn);
 }
 
 /*
@@ -214,7 +214,7 @@ CreatePolyPolygonRgn( const POINT* lppt,
                       int nCount,
                       int fnPolyFillMode)
 {
-    return (HRGN) NtGdiPolyPolyDraw(  (HDC) fnPolyFillMode, (PPOINT) lppt, (PULONG) lpPolyCounts, (ULONG) nCount, GdiPolyPolyRgn );
+    return (HRGN) NtGdiPolyPolyDraw( ULongToHandle(fnPolyFillMode), (PPOINT) lppt, (PULONG) lpPolyCounts, (ULONG) nCount, GdiPolyPolyRgn );
 }
 
 /*