OnAnnEnumerate example for C++ Builder
//This example is also for:
// AnnEnumerate method
//This event is fired for each annotation
//Displays the handle for each annotation
void __fastcall TForm1::LEADAnn1AnnEnumerate (L_HANDLE hObject)
{
AnsiString Msg;
Msg= "hObject: " + IntToStr (LEADAnn1->AnnGetTag (hObject));
ShowMessage (Msg);
}
//Load image and annotation file and then enumerate all the annotations
void __fastcall TForm1::Button1Click(TObject *Sender)
{
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, NULL);
}