unit Paraformat_Beispiel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, richedit, StdCtrls, ComCtrls;
type
TForm1 =
class(TForm)
RichEdit1: TRichEdit;
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
pf2 : PARAFORMAT2;
i : Integer;
begin
SendMessage(Richedit1.Handle, EM_GETPARAFORMAT, 0, Longint(@pf2));
// brauche ich das?
FillChar(pf2, SizeOf(pf2), 0);
// brauche ich das?
pf2.cbSize := SizeOf(pf2);
pf2.dwMask := PFM_Tabstops;
pf2.cTabCount :=5;
pf2.rgxTabs[0]:=1440;
pf2.rgxTabs[1]:=2880
or $02000000;
pf2.rgxTabs[2]:=4000;
pf2.rgxTabs[3]:=5000;
pf2.rgxTabs[4]:=6000;
SendMessage(Richedit1.Handle, EM_SETPARAFORMAT, 0, Longint(@pf2));
end;
end.