mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 11:19:22 +02:00
Fixes getting the text of TMemo on unicode win32
git-svn-id: trunk@13019 -
This commit is contained in:
parent
fba773a9a7
commit
8588444419
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user