LCL: Win32 less hints and removed invalid character

git-svn-id: trunk@64776 -
This commit is contained in:
michl 2021-03-10 17:15:06 +00:00
parent 5106c16eef
commit e839e70441

View File

@ -258,13 +258,13 @@ begin
end;
end;
(* Get the maximum length of the given string in pixels *)
(* Get the maximum length of the given string in pixels *)
function StringSize(const aCaption: String; const aHDC: HDC): TSize;
var
tmpRect: Windows.RECT;
WideBuffer: widestring;
begin
FillChar(tmpRect, SizeOf(tmpRect), 0);
tmpRect := Rect(0, 0, 0, 0);
WideBuffer := UTF8ToUTF16(aCaption);
DrawTextW(aHDC, PWideChar(WideBuffer), length(WideBuffer), @TmpRect, DT_CALCRECT);