mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 20:00:17 +02:00
LCL: TEdit/TMemo: use UTF8ToUTF16 instead of string magic to be FPC 2.6.4 compatible. Issue #8657
git-svn-id: trunk@53887 -
This commit is contained in:
parent
b310cb9b16
commit
98625cfd74
@ -176,7 +176,7 @@ type
|
||||
class procedure SetReadOnly(const ACustomEdit: TCustomEdit; NewReadOnly: boolean); override;
|
||||
class procedure SetSelStart(const ACustomEdit: TCustomEdit; NewStart: integer); override;
|
||||
class procedure SetSelLength(const ACustomEdit: TCustomEdit; NewLength: integer); override;
|
||||
class procedure SetSelText(const ACustomEdit: TCustomEdit; NewSelText: string); override;
|
||||
class procedure SetSelText(const ACustomEdit: TCustomEdit; const NewSelText: string); override;
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: string); override;
|
||||
class procedure SetFont(const AWinControl: TWinControl; const AFont: TFont); override;
|
||||
class procedure SetTextHint(const ACustomEdit: TCustomEdit; const ATextHint: string); override;
|
||||
@ -1309,9 +1309,9 @@ begin
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomEdit.SetSelText(const ACustomEdit: TCustomEdit;
|
||||
NewSelText: string);
|
||||
const NewSelText: string);
|
||||
begin
|
||||
SendMessageW(ACustomEdit.Handle, EM_REPLACESEL, WPARAM(1), LPARAM(PWideChar(WideString(NewSelText))));
|
||||
SendMessageW(ACustomEdit.Handle, EM_REPLACESEL, WPARAM(1), LPARAM(PWideChar(UTF8ToUTF16(NewSelText))));
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomEdit.SetText(const AWinControl: TWinControl;
|
||||
@ -1329,7 +1329,7 @@ class procedure TWin32WSCustomEdit.SetTextHint(const ACustomEdit: TCustomEdit;
|
||||
const ATextHint: string);
|
||||
begin
|
||||
if not WSCheckHandleAllocated(ACustomEdit, 'SetTextHint') then Exit;
|
||||
SendMessage(ACustomEdit.Handle, EM_SETCUEBANNER, 1, {%H-}LParam(PWideChar(WideString(ATextHint))));
|
||||
SendMessage(ACustomEdit.Handle, EM_SETCUEBANNER, 1, {%H-}LParam(PWideChar(UTF8ToUTF16(ATextHint))));
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomEdit.Cut(const ACustomEdit: TCustomEdit);
|
||||
|
@ -159,7 +159,7 @@ type
|
||||
class procedure SetReadOnly(const ACustomEdit: TCustomEdit; NewReadOnly: boolean); virtual;
|
||||
class procedure SetSelStart(const ACustomEdit: TCustomEdit; NewStart: integer); virtual;
|
||||
class procedure SetSelLength(const ACustomEdit: TCustomEdit; NewLength: integer); virtual;
|
||||
class procedure SetSelText(const ACustomEdit: TCustomEdit; NewSelText: string); virtual;
|
||||
class procedure SetSelText(const ACustomEdit: TCustomEdit; const NewSelText: string); virtual;
|
||||
class procedure SetTextHint(const ACustomEdit: TCustomEdit; const ATextHint: string); virtual;
|
||||
class function CreateEmulatedTextHintFont(const ACustomEdit: TCustomEdit): TFont; virtual;
|
||||
|
||||
@ -577,7 +577,7 @@ begin
|
||||
end;
|
||||
|
||||
class procedure TWSCustomEdit.SetSelText(const ACustomEdit: TCustomEdit;
|
||||
NewSelText: string);
|
||||
const NewSelText: string);
|
||||
var
|
||||
OldText, NewText: string;
|
||||
OldPos: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user