LCL, fix crashes related to text sizing for WindowsUnicodeSupport under win9x

git-svn-id: trunk@14143 -
This commit is contained in:
jesus 2008-02-15 19:43:52 +00:00
parent 157bab37f1
commit 6617af4295

View File

@ -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);