You can set line spacing and URL autodetection like this:
const
MAX_TAB_STOPS = 32;
PFM_LINESPACING = $00000100;
ENM_LINK = $04000000;
EM_AUTOURLDETECT = WM_USER + 91;
type
PARAFORMAT2 = record
cbSize: UINT;
dwMask: DWORD;
wNumbering: Word;
wReserved: Word;
dxStartIndent: Longint;
dxRightIndent: Longint;
dxOffset: Longint;
wAlignment: Word;
cTabCount: Smallint;
rgxTabs: array [0..MAX_TAB_STOPS - 1] of Longint;
dySpaceBefore: Longint; { Vertical spacing before para }
dySpaceAfter: Longint; { Vertical spacing after para }
dyLineSpacing: Longint; { Line spacing depending on Rule }
sStyle: Smallint; { Style handle }
bLineSpacingRule: Byte; { Rule for line spacing (see tom.doc) }
bCRC: Byte; { Reserved for CRC for rapid searching }
wShadingWeight: Word; { Shading in hundredths of a per cent }
wShadingStyle: Word; { Nibble 0: style, 1: cfpat, 2: cbpat }
wNumberingStart: Word; { Starting value for numbering }
wNumberingStyle: Word; { Alignment, roman/arabic, (), ), ., etc. }
wNumberingTab: Word; { Space bet 1st indent and 1st-line text }
wBorderSpace: Word; { Space between border and text (twips) }
wBorderWidth: Word; { Border pen width (twips) }
wBorders: Word; { Byte 0: bits specify which borders }
end;
procedure RE_SetLineSpacing(ARichEdit: TlzRichEdit; lineSpacing: Byte);
var
pf2: ParaFormat2;
begin
FillChar(pf2, SizeOf(pf2), 0);
pf2.cbSize := SizeOf(PARAFORMAT2);
pf2.dwMask := PFM_LINESPACING;
pf2.bLineSpacingRule := lineSpacing;
SendMessage(ARichEdit.Handle, EM_SETPARAFORMAT, 0, Longint(@pf2));
end;
procedure InitRichEditURLDetection(RE: TlzRichEdit);
var
mask: Word;
begin
mask := SendMessage(RE.Handle, EM_GETEVENTMASK, 0, 0);
SendMessage(RE.Handle, EM_SETEVENTMASK, 0, mask or ENM_LINK);
SendMessage(RE.Handle, EM_AUTOURLDETECT, Integer(True), 0);
end;
procedure TForm1.MenuItem27Click(Sender: TObject);
begin
RE_SetLineSpacing(lzrichedit1, 1);
InitRichEditURLDetection(lzrichedit1);
end;