AnnGetUserHandles example for Delphi
Procedure TForm1.ExampleGetAnnUserHandles ( hObject: HANNOBJECT );
var
nCount: L_INT32;
strVisible: String;
begin
LEADAnn1.AnnGetUserHandles (hObject);
nCount:= LEADAnn1.AnnUserHandlesCount;
if( nCount > 0 ) then
begin
LEADAnn1.AnnGetUserHandle( hObject, 0);
if( LEADAnn1.AnnHandle.Visible = True) then
begin
strVisible:= 'True';
end
else
begin
strVisible:= 'False';
end;
ShowMessage ( 'uIndex = 0 ' + Chr(13) +
'nID = ' + IntToStr(LEADAnn1.AnnHandle.ID) + Chr(13) +
'ContainerX = ' + IntToStr(Trunc(LEADAnn1.AnnHandle.ContainerX)) + Chr(13) +
'ContainerY = ' + IntToStr(Trunc(LEADAnn1.AnnHandle.ContainerY)) + Chr(13) +
'CliantX = ' + IntToStr(LEADAnn1.AnnHandle.ClientX) + Chr(13) +
'ClientY = ' + IntToStr(LEADAnn1.AnnHandle.ClientY) + Chr(13) +
'bVisible = ' + strVisible + Chr(13) +
'PenColor = ' + IntToStr(LEADAnn1.AnnHandle.PenColor) + Chr(13) +
'FillColor = ' + IntToStr(LEADAnn1.AnnHandle.FillColor) + Chr(13) +
'Shape = ' + IntToStr(LEADAnn1.AnnHandle.Shape));
end
else
begin
ShowMessage('No User Handle');
end;
end;