LCL: Win32: Fixed IDE crashes when ssAutoBoth is set for large Lines text. Issue #36192

git-svn-id: trunk@64796 -
This commit is contained in:
michl 2021-03-13 19:30:28 +00:00
parent 23c4243b52
commit 17e504a971
2 changed files with 7 additions and 1 deletions

View File

@ -125,6 +125,7 @@ function WndText(Wnd: HWND): String; inline;
{ String functions that may be moved to the RTL in the future }
function WideStrLCopy(dest, source: PWideChar; maxlen: SizeInt): PWideChar;
procedure UpdateWindowsVersion;
function ValidateWindowTitle(const Str: String): String;
type
PStayOnTopWindowsInfo = ^TStayOnTopWindowsInfo;
@ -1663,6 +1664,11 @@ begin
end;
end;
function ValidateWindowTitle(const Str: String): String;
begin
Result := Copy(Str, 1, MAXWORD);
end;
procedure DoInitialization;
begin
FillChar(DefaultWindowInfo, sizeof(DefaultWindowInfo), 0);

View File

@ -1571,7 +1571,7 @@ begin
begin
pClassName := @EditClsName[0];
SubClassWndProc := @MemoWndProc;
WindowTitle := StrCaption;
WindowTitle := ValidateWindowTitle(StrCaption);
end;
// create window
FinishCreateWindow(AWinControl, Params, false);