diff --git a/lcl/interfaces/win32/win32winapi.inc b/lcl/interfaces/win32/win32winapi.inc index 91de00830c..66b02ac71b 100644 --- a/lcl/interfaces/win32/win32winapi.inc +++ b/lcl/interfaces/win32/win32winapi.inc @@ -1328,8 +1328,13 @@ end; function TWin32WidgetSet.ExtCreatePen(dwPenStyle, dwWidth: DWord; const lplb: TLogBrush; dwStyleCount: DWord; lpStyle: PDWord): HPEN; +var + LB: Windows.LogBrush; begin - Result := Windows.ExtCreatePen(dwPenStyle, dwWidth, Windows.TLOGBRUSH(lplb), dwStyleCount, lpStyle); + LB.lbStyle := lplb.lbStyle; + LB.lbColor := Windows.COLORREF(ColorToRGB(lplb.lbColor)); + LB.lbHatch := lplb.lbHatch; + Result := Windows.ExtCreatePen(dwPenStyle, dwWidth, LB, dwStyleCount, lpStyle); end; {------------------------------------------------------------------------------