Win32 and CustomDrawn: fix compilation with fpc trunk after r39480 #e67589ea6f. Issue #0034022.

git-svn-id: trunk@58639 -
This commit is contained in:
bart 2018-07-26 20:47:03 +00:00
parent 98304b2635
commit e675379977
2 changed files with 10 additions and 0 deletions

View File

@ -1300,8 +1300,13 @@ begin
Rec.LParam := LParam;
Rec.CallBack := CallBack;
LFW.lfFaceName := UTF8ToUTF16(FontName);
{$if fpc_fullversion < 30101}
Result := LongInt(Windows.EnumFontFamiliesExW(DC,
LFW, windows.FontEnumExProc(@EnumExProcRedirW), Windows.LParam(@Rec), Flags));
{$else}
Result := LongInt(Windows.EnumFontFamiliesExW(DC,
LFW, windows.FontEnumExProcW(@EnumExProcRedirW), Windows.LParam(@Rec), Flags));
{$ifend}
end;
(*{------------------------------------------------------------------------------

View File

@ -1310,8 +1310,13 @@ begin
Rec.LParam := LParam;
Rec.CallBack := CallBack;
LFW.lfFaceName := UTF8ToUTF16(FontName);
{$if fpc_fullversion < 30101}
Result := LongInt(Windows.EnumFontFamiliesExW(DC,
LFW, windows.FontEnumExProc(@EnumExProcRedirW), Windows.LParam(@Rec), Flags));
{$else}
Result := LongInt(Windows.EnumFontFamiliesExW(DC,
LFW, windows.FontEnumExProcW(@EnumExProcRedirW), Windows.LParam(@Rec), Flags));
{$ifend}
end;
{------------------------------------------------------------------------------