AnnGetObjectFromTag example for C++ Builder
void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_HANDLE hObject;
long hTag;
AnsiString Msg;
ShowMessage ("I Will Looking For an Object With Tag = 1");
LEADAnn1->EnableMethodErrors = false;
hObject= LEADAnn1->AnnGetObjectFromTag (LEADAnn1->AnnContainer, 1, false);
if ( hObject)
{
hTag= LEADAnn1->AnnGetTag (hObject);
Msg= "There Is an Object With Tag= " + IntToStr ((int) hTag);
ShowMessage (Msg);
}
else
ShowMessage ("No Object Contain Tag = 1");
LEADAnn1->EnableMethodErrors = True;
}