AnnHandle example for Delphi
procedure TForm1.ExampleAnnUserHandle ( hObject: HANNOBJECT );
var
uCount: L_UINT;
strVisible: String;
begin
LEADAnn1.AnnGetUserHandles ( hObject );
uCount:= LEADAnn1.AnnUserHandlesCount;
if ( uCount > 0 ) then
begin
LEADAnn1.AnnGetUserHandle ( hObject, 0 );
if ( LEADAnn1.AnnHandle.Visible ) then
strVisible:= 'True'
else
strVisible:= 'False';
ShowMessage ( 'uIndex = 0' + Chr(13) +
'nID = ' + IntToStr(LEADAnn1.AnnHandle.ID) + Chr(13) +
'ContainerX = ' + FloatToStr(LEADAnn1.AnnHandle.ContainerX) + Chr(13) +
'ContainerY = ' + FloatToStr(LEADAnn1.AnnHandle.ContainerY) + Chr(13) +
'CliantX = ' + IntToStr(LEADAnn1.AnnHandle.ClientX) + Chr(13) +
'ClientY = ' + IntToStr(LEADAnn1.AnnHandle.ClientY) + Chr(13) +
'Visible = ' + strVisible + Chr(13) +
'PenColor = ' + IntToStr(LEADAnn1.AnnHandle.PenColor) + Chr(13) +
'FillColor = ' + IntToStr(LEADAnn1.AnnHandle.FillColor) + Chr(13) +
'Shape = ' + IntToStr(LEADAnn1.AnnHandle.Shape) + Chr(13) );
end
else
ShowMessage ( 'No User Handles' );
end;