From 7bf273c81931d36746179973411d935b90138b95 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 4 May 2012 17:37:07 +0000 Subject: [PATCH] [WIN32K] - Add cjMaxBits parameter to GreCreateDIBitmapInternal - Rename GDIBRUSH_* constants to BR_*, as they are named in gdikdx svn path=/trunk/; revision=56496 --- reactos/win32ss/gdi/eng/engbrush.c | 10 ++++---- reactos/win32ss/gdi/eng/lineto.c | 2 +- reactos/win32ss/gdi/ntgdi/bitblt.c | 2 +- reactos/win32ss/gdi/ntgdi/bitmaps.h | 3 ++- reactos/win32ss/gdi/ntgdi/brush.c | 28 ++++++++++---------- reactos/win32ss/gdi/ntgdi/brush.h | 38 ++++++++++++++-------------- reactos/win32ss/gdi/ntgdi/dibobj.c | 4 ++- reactos/win32ss/gdi/ntgdi/drawing.c | 2 +- reactos/win32ss/gdi/ntgdi/fillshap.c | 8 +++--- reactos/win32ss/gdi/ntgdi/line.c | 4 +-- reactos/win32ss/gdi/ntgdi/pen.c | 24 +++++++++--------- reactos/win32ss/gdi/ntgdi/stockobj.c | 6 ++--- 12 files changed, 67 insertions(+), 64 deletions(-) diff --git a/reactos/win32ss/gdi/eng/engbrush.c b/reactos/win32ss/gdi/eng/engbrush.c index 6721094cd5c..ea930c11826 100644 --- a/reactos/win32ss/gdi/eng/engbrush.c +++ b/reactos/win32ss/gdi/eng/engbrush.c @@ -40,12 +40,12 @@ EBRUSHOBJ_vInit(EBRUSHOBJ *pebo, PBRUSH pbrush, PDC pdc) GDIOBJ_vReferenceObjectByPointer(&pebo->ppalSurf->BaseObject); //pebo->ppalDC = pdc->dclevel.ppal; - if (pbrush->flAttrs & GDIBRUSH_IS_NULL) + if (pbrush->flAttrs & BR_IS_NULL) { /* NULL brushes don't need a color */ pebo->BrushObject.iSolidColor = 0; } - else if (pbrush->flAttrs & GDIBRUSH_IS_SOLID) + else if (pbrush->flAttrs & BR_IS_SOLID) { /* Set the RGB color */ EBRUSHOBJ_vSetSolidRGBColor(pebo, pbrush->BrushAttr.lbColor); @@ -56,7 +56,7 @@ EBRUSHOBJ_vInit(EBRUSHOBJ *pebo, PBRUSH pbrush, PDC pdc) pebo->BrushObject.iSolidColor = 0xFFFFFFFF; /* Use foreground color of hatch brushes */ - if (pbrush->flAttrs & GDIBRUSH_IS_HATCH) + if (pbrush->flAttrs & BR_IS_HATCH) pebo->crCurrentText = pbrush->BrushAttr.lbColor; } } @@ -69,7 +69,7 @@ EBRUSHOBJ_vSetSolidRGBColor(EBRUSHOBJ *pebo, COLORREF crColor) EXLATEOBJ exlo; /* Never use with non-solid brushes */ - ASSERT(pebo->flattrs & GDIBRUSH_IS_SOLID); + ASSERT(pebo->flattrs & BR_IS_SOLID); /* Set the RGB color */ pebo->crRealize = crColor; @@ -217,7 +217,7 @@ EBRUSHOBJ_bRealizeBrush(EBRUSHOBJ *pebo, BOOL bCallDriver) psurfMask = NULL; /* DIB brushes with DIB_PAL_COLORS usage need a new palette */ - if (pebo->pbrush->flAttrs & GDIBRUSH_IS_DIBPALCOLORS) + if (pebo->pbrush->flAttrs & BR_IS_DIBPALCOLORS) { ASSERT(FALSE); ppalPattern = 0; //CreateDIBPalette(psurfPattern->ppal, pebo->ppalDC); diff --git a/reactos/win32ss/gdi/eng/lineto.c b/reactos/win32ss/gdi/eng/lineto.c index afe56b05971..e61b8e7a9fb 100644 --- a/reactos/win32ss/gdi/eng/lineto.c +++ b/reactos/win32ss/gdi/eng/lineto.c @@ -519,7 +519,7 @@ IntEngLineTo(SURFOBJ *psoDest, ASSERT(GdiBrush); ASSERT(GdiBrush->pbrush); - if (GdiBrush->pbrush->flAttrs & GDIBRUSH_IS_NULL) + if (GdiBrush->pbrush->flAttrs & BR_IS_NULL) return TRUE; /* No success yet */ diff --git a/reactos/win32ss/gdi/ntgdi/bitblt.c b/reactos/win32ss/gdi/ntgdi/bitblt.c index d6459f4cfbb..6dc3e6618c3 100644 --- a/reactos/win32ss/gdi/ntgdi/bitblt.c +++ b/reactos/win32ss/gdi/ntgdi/bitblt.c @@ -831,7 +831,7 @@ IntPatBlt( FIXUP_ROP(dwRop); - if (pbrush->flAttrs & GDIBRUSH_IS_NULL) + if (pbrush->flAttrs & BR_IS_NULL) { return TRUE; } diff --git a/reactos/win32ss/gdi/ntgdi/bitmaps.h b/reactos/win32ss/gdi/ntgdi/bitmaps.h index c101f16ceed..b8231765542 100644 --- a/reactos/win32ss/gdi/ntgdi/bitmaps.h +++ b/reactos/win32ss/gdi/ntgdi/bitmaps.h @@ -25,7 +25,7 @@ GreCreateBitmapEx( _In_ FLONG flags); HBITMAP -FASTCALL +NTAPI GreCreateDIBitmapInternal( IN HDC hDc, IN INT cx, @@ -35,4 +35,5 @@ GreCreateDIBitmapInternal( IN OPTIONAL PBITMAPINFO pbmi, IN DWORD iUsage, IN FLONG fl, + IN UINT cjMaxBits, IN HANDLE hcmXform); diff --git a/reactos/win32ss/gdi/ntgdi/brush.c b/reactos/win32ss/gdi/ntgdi/brush.c index fa08cab99c8..ba76b3e46dc 100644 --- a/reactos/win32ss/gdi/ntgdi/brush.c +++ b/reactos/win32ss/gdi/ntgdi/brush.c @@ -40,7 +40,7 @@ FASTCALL IntGdiSetBrushOwner(PBRUSH pbr, ULONG ulOwner) { // FIXME: - if (pbr->flAttrs & GDIBRUSH_IS_GLOBAL) return TRUE; + if (pbr->flAttrs & BR_IS_GLOBAL) return TRUE; if ((ulOwner == GDI_OBJ_HMGR_PUBLIC) || ulOwner == GDI_OBJ_HMGR_NONE) { @@ -129,7 +129,7 @@ NTAPI BRUSH_Cleanup(PVOID ObjectBody) { PBRUSH pbrush = (PBRUSH)ObjectBody; - if (pbrush->flAttrs & (GDIBRUSH_IS_HATCH | GDIBRUSH_IS_BITMAP)) + if (pbrush->flAttrs & (BR_IS_HATCH | BR_IS_BITMAP)) { ASSERT(pbrush->hbmPattern); GreSetObjectOwner(pbrush->hbmPattern, GDI_OBJ_HMGR_POWNED); @@ -162,7 +162,7 @@ BRUSH_GetObject(PBRUSH pbrush, INT Count, LPLOGBRUSH Buffer) Buffer->lbColor = pbrush->BrushAttr.lbColor; /* Set Hatch */ - if ((pbrush->flAttrs & GDIBRUSH_IS_HATCH)!=0) + if ((pbrush->flAttrs & BR_IS_HATCH)!=0) { /* FIXME: This is not the right value */ Buffer->lbHatch = (LONG)pbrush->hbmPattern; @@ -175,23 +175,23 @@ BRUSH_GetObject(PBRUSH pbrush, INT Count, LPLOGBRUSH Buffer) Buffer->lbStyle = 0; /* Get the type of style */ - if ((pbrush->flAttrs & GDIBRUSH_IS_SOLID)!=0) + if ((pbrush->flAttrs & BR_IS_SOLID)!=0) { Buffer->lbStyle = BS_SOLID; } - else if ((pbrush->flAttrs & GDIBRUSH_IS_NULL)!=0) + else if ((pbrush->flAttrs & BR_IS_NULL)!=0) { Buffer->lbStyle = BS_NULL; // BS_HOLLOW } - else if ((pbrush->flAttrs & GDIBRUSH_IS_HATCH)!=0) + else if ((pbrush->flAttrs & BR_IS_HATCH)!=0) { Buffer->lbStyle = BS_HATCHED; } - else if ((pbrush->flAttrs & GDIBRUSH_IS_BITMAP)!=0) + else if ((pbrush->flAttrs & BR_IS_BITMAP)!=0) { Buffer->lbStyle = BS_PATTERN; } - else if ((pbrush->flAttrs & GDIBRUSH_IS_DIB)!=0) + else if ((pbrush->flAttrs & BR_IS_DIB)!=0) { Buffer->lbStyle = BS_DIBPATTERN; } @@ -254,7 +254,7 @@ IntGdiCreateDIBBrush( } hBrush = pbrush->BaseObject.hHmgr; - pbrush->flAttrs |= GDIBRUSH_IS_BITMAP | GDIBRUSH_IS_DIB; + pbrush->flAttrs |= BR_IS_BITMAP | BR_IS_DIB; pbrush->hbmPattern = hPattern; /* FIXME: Fill in the rest of fields!!! */ @@ -296,7 +296,7 @@ IntGdiCreateHatchBrush( } hBrush = pbrush->BaseObject.hHmgr; - pbrush->flAttrs |= GDIBRUSH_IS_HATCH; + pbrush->flAttrs |= BR_IS_HATCH; pbrush->hbmPattern = hPattern; pbrush->BrushAttr.lbColor = Color & 0xFFFFFF; @@ -332,7 +332,7 @@ IntGdiCreatePatternBrush( } hBrush = pbrush->BaseObject.hHmgr; - pbrush->flAttrs |= GDIBRUSH_IS_BITMAP; + pbrush->flAttrs |= BR_IS_BITMAP; pbrush->hbmPattern = hPattern; /* FIXME: Fill in the rest of fields!!! */ @@ -359,7 +359,7 @@ IntGdiCreateSolidBrush( } hBrush = pbrush->BaseObject.hHmgr; - pbrush->flAttrs |= GDIBRUSH_IS_SOLID; + pbrush->flAttrs |= BR_IS_SOLID; pbrush->BrushAttr.lbColor = Color & 0x00FFFFFF; /* FIXME: Fill in the rest of fields!!! */ @@ -384,7 +384,7 @@ IntGdiCreateNullBrush(VOID) } hBrush = pbrush->BaseObject.hHmgr; - pbrush->flAttrs |= GDIBRUSH_IS_NULL; + pbrush->flAttrs |= BR_IS_NULL; GDIOBJ_vUnlockObject(&pbrush->BaseObject); return hBrush; @@ -397,7 +397,7 @@ IntGdiSetSolidBrushColor(HBRUSH hBrush, COLORREF Color) PBRUSH pbrush; pbrush = BRUSH_ShareLockBrush(hBrush); - if (pbrush->flAttrs & GDIBRUSH_IS_SOLID) + if (pbrush->flAttrs & BR_IS_SOLID) { pbrush->BrushAttr.lbColor = Color & 0xFFFFFF; } diff --git a/reactos/win32ss/gdi/ntgdi/brush.h b/reactos/win32ss/gdi/ntgdi/brush.h index 267216dcb15..055f4915d04 100644 --- a/reactos/win32ss/gdi/ntgdi/brush.h +++ b/reactos/win32ss/gdi/ntgdi/brush.h @@ -19,7 +19,7 @@ typedef struct _BRUSH ULONG ulStyle; HBITMAP hbmPattern; - HANDLE hbmClient; + HBITMAP hbmClient; ULONG flAttrs; ULONG ulBrushUnique; @@ -67,24 +67,24 @@ typedef struct _EBRUSHOBJ } EBRUSHOBJ, *PEBRUSHOBJ; /* GDI Brush Attributes */ -#define GDIBRUSH_NEED_FG_CLR 0x0001 -#define GDIBRUSH_NEED_BK_CLR 0x0002 /* Background color is needed */ -#define GDIBRUSH_DITHER_OK 0x0004 /* Allow color dithering */ -#define GDIBRUSH_IS_SOLID 0x0010 /* Solid brush */ -#define GDIBRUSH_IS_HATCH 0x0020 /* Hatch brush */ -#define GDIBRUSH_IS_BITMAP 0x0040 /* DDB pattern brush */ -#define GDIBRUSH_IS_DIB 0x0080 /* DIB pattern brush */ -#define GDIBRUSH_IS_NULL 0x0100 /* Null/hollow brush */ -#define GDIBRUSH_IS_GLOBAL 0x0200 /* Stock objects */ -#define GDIBRUSH_IS_PEN 0x0400 /* Pen */ -#define GDIBRUSH_IS_OLDSTYLEPEN 0x0800 /* Geometric pen */ -#define GDIBRUSH_IS_DIBPALCOLORS 0x1000 -#define GDIBRUSH_IS_DIBPALINDICE 0x2000 -#define GDIBRUSH_IS_DEFAULTSTYLE 0x4000 -#define GDIBRUSH_IS_MASKING 0x8000 /* Pattern bitmap is used as transparent mask (?) */ -#define GDIBRUSH_IS_INSIDEFRAME 0x00010000 -#define GDIBRUSH_CACHED_ENGINE 0x00040000 -#define GDIBRUSH_CACHED_IS_SOLID 0x80000000 +#define BR_NEED_FG_CLR 0x00000001 +#define BR_NEED_BK_CLR 0x00000002 /* Background color is needed */ +#define BR_DITHER_OK 0x00000004 /* Allow color dithering */ +#define BR_IS_SOLID 0x00000010 /* Solid brush */ +#define BR_IS_HATCH 0x00000020 /* Hatch brush */ +#define BR_IS_BITMAP 0x00000040 /* DDB pattern brush */ +#define BR_IS_DIB 0x00000080 /* DIB pattern brush */ +#define BR_IS_NULL 0x00000100 /* Null/hollow brush */ +#define BR_IS_GLOBAL 0x00000200 /* Stock objects */ +#define BR_IS_PEN 0x00000400 /* Pen */ +#define BR_IS_OLDSTYLEPEN 0x00000800 /* Geometric pen */ +#define BR_IS_DIBPALCOLORS 0x00001000 +#define BR_IS_DIBPALINDICE 0x00002000 +#define BR_IS_DEFAULTSTYLE 0x00004000 +#define BR_IS_MASKING 0x00008000 /* Pattern bitmap is used as transparent mask (?) */ +#define BR_IS_INSIDEFRAME 0x00010000 +#define BR_CACHED_ENGINE 0x00040000 +#define BR_CACHED_IS_SOLID 0x80000000 #define BRUSH_AllocBrush() ((PBRUSH) GDIOBJ_AllocObj(GDIObjType_BRUSH_TYPE)) #define BRUSH_AllocBrushWithHandle() ((PBRUSH) GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_BRUSH, sizeof(BRUSH))) diff --git a/reactos/win32ss/gdi/ntgdi/dibobj.c b/reactos/win32ss/gdi/ntgdi/dibobj.c index b5d8cfc412c..deedecd0c1e 100644 --- a/reactos/win32ss/gdi/ntgdi/dibobj.c +++ b/reactos/win32ss/gdi/ntgdi/dibobj.c @@ -1294,6 +1294,7 @@ NtGdiCreateDIBitmapInternal( pbmi, iUsage, fl, + cjMaxBits, hcmXform); cleanup: @@ -1302,7 +1303,7 @@ cleanup: } HBITMAP -FASTCALL +NTAPI GreCreateDIBitmapInternal( IN HDC hDc, IN INT cx, @@ -1312,6 +1313,7 @@ GreCreateDIBitmapInternal( IN OPTIONAL PBITMAPINFO pbmi, IN DWORD iUsage, IN FLONG fl, + IN UINT cjMaxBits, IN HANDLE hcmXform) { PDC Dc; diff --git a/reactos/win32ss/gdi/ntgdi/drawing.c b/reactos/win32ss/gdi/ntgdi/drawing.c index 0b4b338a0ac..0d28de08a22 100644 --- a/reactos/win32ss/gdi/ntgdi/drawing.c +++ b/reactos/win32ss/gdi/ntgdi/drawing.c @@ -1263,7 +1263,7 @@ IntFillRect( DC *dc, return 0; } - if (!(pbrush->flAttrs & GDIBRUSH_IS_NULL)) + if (!(pbrush->flAttrs & BR_IS_NULL)) { pdcattr = dc->pdcattr; diff --git a/reactos/win32ss/gdi/ntgdi/fillshap.c b/reactos/win32ss/gdi/ntgdi/fillshap.c index f1575841b19..846398d11a9 100644 --- a/reactos/win32ss/gdi/ntgdi/fillshap.c +++ b/reactos/win32ss/gdi/ntgdi/fillshap.c @@ -85,7 +85,7 @@ IntGdiPolygon(PDC dc, ASSERT(psurf); /* Now fill the polygon with the current fill brush. */ - if (!(pbrFill->flAttrs & GDIBRUSH_IS_NULL)) + if (!(pbrFill->flAttrs & BR_IS_NULL)) { BrushOrigin = *((PPOINTL)&pbrFill->ptOrigin); BrushOrigin.x += dc->ptlDCOrig.x; @@ -100,7 +100,7 @@ IntGdiPolygon(PDC dc, } // Draw the Polygon Edges with the current pen ( if not a NULL pen ) - if (!(pbrLine->flAttrs & GDIBRUSH_IS_NULL)) + if (!(pbrLine->flAttrs & BR_IS_NULL)) { int i; @@ -574,7 +574,7 @@ IntRectangle(PDC dc, if (pbrFill) { - if (!(pbrFill->flAttrs & GDIBRUSH_IS_NULL)) + if (!(pbrFill->flAttrs & BR_IS_NULL)) { BrushOrigin = *((PPOINTL)&pbrFill->ptOrigin); BrushOrigin.x += dc->ptlDCOrig.x; @@ -597,7 +597,7 @@ IntRectangle(PDC dc, ret = TRUE; // Change default to success - if (!(pbrLine->flAttrs & GDIBRUSH_IS_NULL)) + if (!(pbrLine->flAttrs & BR_IS_NULL)) { Mix = ROP2_TO_MIX(pdcattr->jROP2); ret = ret && IntEngLineTo(&psurf->SurfObj, diff --git a/reactos/win32ss/gdi/ntgdi/line.c b/reactos/win32ss/gdi/ntgdi/line.c index cb2c87eb561..3e9b96827da 100644 --- a/reactos/win32ss/gdi/ntgdi/line.c +++ b/reactos/win32ss/gdi/ntgdi/line.c @@ -131,7 +131,7 @@ IntGdiLineTo(DC *dc, pbrLine = dc->dclevel.pbrLine; ASSERT(pbrLine); - if (!(pbrLine->flAttrs & GDIBRUSH_IS_NULL)) + if (!(pbrLine->flAttrs & BR_IS_NULL)) { Ret = IntEngLineTo(&psurf->SurfObj, dc->rosdc.CombinedClip, @@ -249,7 +249,7 @@ IntGdiPolyline(DC *dc, pbrLine = dc->dclevel.pbrLine; ASSERT(pbrLine); - if (!(pbrLine->flAttrs & GDIBRUSH_IS_NULL)) + if (!(pbrLine->flAttrs & BR_IS_NULL)) { Points = EngAllocMem(0, Count * sizeof(POINT), GDITAG_TEMP); if (Points != NULL) diff --git a/reactos/win32ss/gdi/ntgdi/pen.c b/reactos/win32ss/gdi/ntgdi/pen.c index c9798ee65ac..1b2231575c0 100644 --- a/reactos/win32ss/gdi/ntgdi/pen.c +++ b/reactos/win32ss/gdi/ntgdi/pen.c @@ -86,7 +86,7 @@ IntGdiExtCreatePen( pbrushPen->dwStyleCount = dwStyleCount; pbrushPen->pStyle = pStyle; - pbrushPen->flAttrs = bOldStylePen? GDIBRUSH_IS_OLDSTYLEPEN : GDIBRUSH_IS_PEN; + pbrushPen->flAttrs = bOldStylePen? BR_IS_OLDSTYLEPEN : BR_IS_PEN; // If dwPenStyle is PS_COSMETIC, the width must be set to 1. if ( !(bOldStylePen) && ((dwPenStyle & PS_TYPE_MASK) == PS_COSMETIC) && ( dwWidth != 1) ) @@ -95,40 +95,40 @@ IntGdiExtCreatePen( switch (dwPenStyle & PS_STYLE_MASK) { case PS_NULL: - pbrushPen->flAttrs |= GDIBRUSH_IS_NULL; + pbrushPen->flAttrs |= BR_IS_NULL; break; case PS_SOLID: - pbrushPen->flAttrs |= GDIBRUSH_IS_SOLID; + pbrushPen->flAttrs |= BR_IS_SOLID; break; case PS_ALTERNATE: - pbrushPen->flAttrs |= GDIBRUSH_IS_BITMAP; + pbrushPen->flAttrs |= BR_IS_BITMAP; pbrushPen->hbmPattern = GreCreateBitmap(24, 1, 1, 1, (LPBYTE)PatternAlternate); break; case PS_DOT: - pbrushPen->flAttrs |= GDIBRUSH_IS_BITMAP; + pbrushPen->flAttrs |= BR_IS_BITMAP; pbrushPen->hbmPattern = GreCreateBitmap(24, 1, 1, 1, (LPBYTE)PatternDot); break; case PS_DASH: - pbrushPen->flAttrs |= GDIBRUSH_IS_BITMAP; + pbrushPen->flAttrs |= BR_IS_BITMAP; pbrushPen->hbmPattern = GreCreateBitmap(24, 1, 1, 1, (LPBYTE)PatternDash); break; case PS_DASHDOT: - pbrushPen->flAttrs |= GDIBRUSH_IS_BITMAP; + pbrushPen->flAttrs |= BR_IS_BITMAP; pbrushPen->hbmPattern = GreCreateBitmap(24, 1, 1, 1, (LPBYTE)PatternDashDot); break; case PS_DASHDOTDOT: - pbrushPen->flAttrs |= GDIBRUSH_IS_BITMAP; + pbrushPen->flAttrs |= BR_IS_BITMAP; pbrushPen->hbmPattern = GreCreateBitmap(24, 1, 1, 1, (LPBYTE)PatternDashDotDot); break; case PS_INSIDEFRAME: - pbrushPen->flAttrs |= (GDIBRUSH_IS_SOLID|GDIBRUSH_IS_INSIDEFRAME); + pbrushPen->flAttrs |= (BR_IS_SOLID|BR_IS_INSIDEFRAME); break; case PS_USERSTYLE: @@ -136,7 +136,7 @@ IntGdiExtCreatePen( { /* FIXME: PS_USERSTYLE workaround */ DPRINT1("PS_COSMETIC | PS_USERSTYLE not handled\n"); - pbrushPen->flAttrs |= GDIBRUSH_IS_SOLID; + pbrushPen->flAttrs |= BR_IS_SOLID; break; } else @@ -180,7 +180,7 @@ IntGdiSetSolidPenColor(HPEN hPen, COLORREF Color) pbrPen = PEN_ShareLockPen(hPen); if (pbrPen) { - if (pbrPen->flAttrs & GDIBRUSH_IS_SOLID) + if (pbrPen->flAttrs & BR_IS_SOLID) { pbrPen->BrushAttr.lbColor = Color & 0xFFFFFF; } @@ -195,7 +195,7 @@ PEN_GetObject(PBRUSH pbrushPen, INT cbCount, PLOGPEN pBuffer) PEXTLOGPEN pExtLogPen; INT cbRetCount; - if (pbrushPen->flAttrs & GDIBRUSH_IS_OLDSTYLEPEN) + if (pbrushPen->flAttrs & BR_IS_OLDSTYLEPEN) { cbRetCount = sizeof(LOGPEN); if (pBuffer) diff --git a/reactos/win32ss/gdi/ntgdi/stockobj.c b/reactos/win32ss/gdi/ntgdi/stockobj.c index 40fd5caa5ad..84bdf2ea239 100644 --- a/reactos/win32ss/gdi/ntgdi/stockobj.c +++ b/reactos/win32ss/gdi/ntgdi/stockobj.c @@ -120,16 +120,16 @@ IntCreateStockPen(DWORD dwPenStyle, pbrushPen->hbmClient = (HANDLE)NULL; pbrushPen->dwStyleCount = 0; pbrushPen->pStyle = 0; - pbrushPen->flAttrs = GDIBRUSH_IS_OLDSTYLEPEN; + pbrushPen->flAttrs = BR_IS_OLDSTYLEPEN; switch (dwPenStyle & PS_STYLE_MASK) { case PS_NULL: - pbrushPen->flAttrs |= GDIBRUSH_IS_NULL; + pbrushPen->flAttrs |= BR_IS_NULL; break; case PS_SOLID: - pbrushPen->flAttrs |= GDIBRUSH_IS_SOLID; + pbrushPen->flAttrs |= BR_IS_SOLID; break; } hPen = pbrushPen->BaseObject.hHmgr;