Fixes getting the text of TMemo on unicode win32

git-svn-id: trunk@13019 -
This commit is contained in:
sekelsenmat 2007-11-25 10:47:25 +00:00
parent fba773a9a7
commit 8588444419

View File

@ -47,13 +47,18 @@ var
CapLen: dword;
Caption: PChar;
begin
{$ifdef WindowsUnicodeSupport}
Result := win32proc.GetControlText(fHandle);
{$else}
Result := '';
// TODO: this can be made shorter probably, using SetLength(AText, ...)
CapLen := GetWindowTextLength(fHandle);
Caption := StrAlloc(CapLen + 1);
GetWindowText(fHandle, Caption, CapLen + 1);
Result := StrPas(Caption);
StrDispose(Caption);
{$endif}
end;
function TWin32MemoStrings.GetRealCount: integer;