AnnUserHandle example for Delphi
Procedure TFOrm1.ExampleGetAnnUserHandles ( hObject: HANNOBJECT );
var
i: L_INT;
uCount: L_UINT;
strVisible: String;
begin
LEADAnn1.AnnGetUserHandles ( hObject );
uCount:= LEADAnn1.AnnUserHandlesCount;
if ( uCount > 0 ) then
begin
for i:= 0 to uCount - 1 do
begin
if ( LEADAnn1.AnnUserHandle[i].Visible ) then
strVisible:= 'bVisible = True'
else
strVisible:= 'bVisible = False';
ShowMessage ( 'uIndex = ' + IntToStr(i) + Chr(13) +
'nID = ' + IntToStr(LEADAnn1.AnnUserHandle[i].ID) + Chr(13) +
'ContainerX = ' + IntToStr(Trunc(LEADAnn1.AnnUserHandle[i].ContainerX)) + Chr(13) +
'ContainerY = ' + IntToStr(Trunc(LEADAnn1.AnnUserHandle[i].ContainerY)) + Chr(13) +
'CliantX = ' + IntToStr(LEADAnn1.AnnUserHandle[i].ClientX) + Chr(13) +
'ClientY = ' + IntToStr(LEADAnn1.AnnUserHandle[i].ClientY) + Chr(13) +
strVisible + Chr(13) +
'PenColor = ' + IntToStr(LEADAnn1.AnnUserHandle[i].PenColor) + Chr(13) +
'FillColor = ' + IntToStr(LEADAnn1.AnnUserHandle[i].FillColor) + Chr(13) +
'Shape = ' + IntToStr(LEADAnn1.AnnUserHandle[i].Shape) + Chr(13));
end;
end
else
ShowMessage ( 'No User Handles' );
end;