AnnParentRasterView example for Delphi
//This sample shows the minimal code to use the LEAD Annotation COM object
//LEADRasterView1 is a LEAD Raster View control
var
RasterAnn: LEADRasterAnnotation;
procedure TForm1.AnnParentRasterViewClick(Sender: TObject);
begin
//Unlock the annotation support
//Note that L_KEY_DOCUMENT is a #define for the support key that you must supply
LEADRasterView1.Raster.UnlockSupport (L_SUPPORT_DOCUMENT, L_KEY_DOCUMENT);
//Attach the annotation object to the raster view control
RasterAnn.AnnParentRasterView:= LEADRasterView1.Raster;
//Automatically update annotations with raster changes
RasterAnn.AnnAutoUpdate:= True;
//...
//... the rest of the program
//...
end;