AnnInsert example for C++ Builder

Note:

This topic is for Document/Medical only.

//This example
//1.creates an ellipse annotation object
//2.sizes the ellipse
//3.inserts the ellipse into the annotation container
void __fastcall TForm1::AnnInsertClick(TObject *Sender)
{
   long hEllipseObject;

   pRasterAnn->AnnCreate (ANN_OBJECT_ELLIPSE, false, true) ;
   hEllipseObject= pRasterAnn->AnnObject;
   pRasterAnn->set_AnnRectLeft (hEllipseObject, 0);
   pRasterAnn->set_AnnRectTop (hEllipseObject, 0);
   pRasterAnn->set_AnnRectWidth (hEllipseObject, 100);
   pRasterAnn->set_AnnRectHeight (hEllipseObject, 100);
   pRasterAnn->AnnInsert ( pRasterAnn->AnnContainer, hEllipseObject, false ) ;
}