OnAnnEnumerate example for Delphi
//This example is also for:
//AnnEnumerate method
//This event is fired for each annotation
//Displays the handle for each annotation
procedure TForm1.LEADAnn1AnnEnumerate (hObject: L_HANDLE);
var
Msg: String;
begin
Msg:= 'hObject: ' + IntToStr (LEADAnn1.AnnGetTag(hObject));
ShowMessage (Msg);
end;
//Load image and annotation file and then enumerate all the annotations
procedure TForm1.Button1Click(Sender: TObject);
begin
LEADAnn1.Load ('D:\pictures\Test.cmp', 0, 0, 1);
LEADAnn1.AnnLoad ('D:\pictures\Test.ann', 0);
LEADAnn1.AnnUserMode:= ANNUSERMODE_RUN ;
LEADAnn1.AnnEnumerate (LEADAnn1.AnnContainer,
ANNFLAG_RECURSE + ANNFLAG_NOTTHIS, Nil);
end;