procedure TForm1.bformatClick(Sender: TObject);
var
aparaformat2 : TParaFormat2;
begin
ZeroMemory(@aparaformat2, sizeof(aparaformat2));
aparaformat2.cbSize := SizeOf(aparaformat2);
aparaformat2.dwMask := PFM_LINESPACING;
aparaformat2.bLineSpacingRule := 2;
SendMessage(cxRichEdit1.InnerControl.Handle, EM_SETPARAFORMAT, 0, LParam(@aparaformat2));
end;
procedure TForm1.bRestoreClick(Sender: TObject);
begin
cxRichEdit1.InternalEditValue := aString;
end;
procedure TForm1.bSaveClick(Sender: TObject);
begin
aString := cxRichEdit1.InternalEditValue;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
aString := '
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil Tahoma;}}'
+ #$D#$A'
\viewkind4\uc1\pard\sl0\slmult0\lang2055\f0\fs16 '
+ '
that''
s a string with three lines\par'#$D#$A'
second\par'
+ #$D#$A'
thirt\par'#$D#$A'
and so on\par'#$D#$A'
}'#$D#$A#0;
cxRichEdit1.InternalEditValue := aString;
end;