13 /* Note same behoir as Windows 2000/XP/VISTA, they do not care if plgpn is NULLĀ“, it will crash */
14 return CreatePen(lplgpn
->lopnStyle
, lplgpn
->lopnWidth
.x
, lplgpn
->lopnColor
);
29 if (nPenStyle
< PS_SOLID
) nPenStyle
= PS_SOLID
;
30 if (nPenStyle
> PS_DASHDOTDOT
)
32 if (nPenStyle
== PS_NULL
) return GetStockObject(NULL_PEN
);
33 if (nPenStyle
!= PS_INSIDEFRAME
) nPenStyle
= PS_SOLID
;
36 hPen
= hGetPEBHandle(hctPenHandle
, nPenStyle
);
37 if ( nWidth
|| nPenStyle
|| !hPen
)
39 return NtGdiCreatePen(nPenStyle
, nWidth
, crColor
, NULL
);
42 if ((GdiGetHandleUserData( hPen
, GDI_OBJECT_TYPE_PEN
, (PVOID
) &Pen_Attr
)) &&
45 if ( Pen_Attr
->lbColor
!= crColor
)
47 Pen_Attr
->lbColor
= crColor
;
48 Pen_Attr
->AttrFlags
|= ATTR_NEW_COLOR
;
54 return NtGdiCreatePen(nPenStyle
, nWidth
, crColor
, NULL
);