mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 13:00:16 +02:00
LCL, fix crashes related to text sizing for WindowsUnicodeSupport under win9x
git-svn-id: trunk@14143 -
This commit is contained in:
parent
157bab37f1
commit
6617af4295
@ -1848,6 +1848,10 @@ begin
|
||||
// TODO: use the real number of chars (and not the lenght)
|
||||
w := Utf8Decode(S);
|
||||
Result := Windows.GetTextExtentPoint32W(DC, PWideChar(W), Length(W), @Size);
|
||||
end else
|
||||
begin
|
||||
s := Utf8ToAnsi(s);
|
||||
Result := Windows.GetTextExtentPoint32(DC, pchar(s), length(s), @Size);
|
||||
end;
|
||||
{$else}
|
||||
Result := Windows.GetTextExtentPoint32(DC, Str, Count, @Size);
|
||||
|
Loading…
Reference in New Issue
Block a user