unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, SynEdit, SynHighlighterCpp;
type
TForm1 =
class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Memo:TSynEdit;
CPP:TSyncppSyn;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Memo:=TSynEdit.Create(Self);
//SynEdit erzeugen
CPP:=TSyncppSyn.Create(Self);
//C++ HL erzeugen
Memo.Highlighter:=CPP;
Memo.Parent:=Form1;
Memo.Top:=10;
Memo.Left:=10;
Memo.Height:=300;
Memo.Width:=500;
end;
procedure TForm1.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
Memo.Free;
CPP.Free;
end;
end.