AnnEnumerateHandles example for Delphi
Procedure TForm1.ExampleAnnEnumerateHandles ( hObject: HANNOBJECT );
begin
LEADAnn1.AnnEnableEnumerateHandlesEvent:= True;
LEADAnn1.AnnEnumerateHandles(hObject);
end;
function TForm1.LEADAnn1AnnEnumerateHandles(hObject: HANNOBJECT;
AnnHandleInfo: TAnnHandleInfo): Integer;
begin
AnnHandleInfo.Visible:= True;
if (AnnHandleInfo.AnnType = ANNHANDLETYPE_DEFAULT_HANDLE) then
begin
AnnHandleInfo.Shape:= ANNHANDLE_SHAPE_SQUARE;
AnnHandleInfo.FillColor:= RGB(0, 0, 255);
AnnHandleInfo.PenColor:= RGB(0, 255, 0);
AnnHandleInfo.ID:= 100;
end
else
begin
AnnHandleInfo.Shape:= ANNHANDLE_SHAPE_CIRCLE;
AnnHandleInfo.FillColor:= RGB(0, 255, 0);
AnnHandleInfo.PenColor:= RGB(0, 0, 255);
AnnHandleInfo.ID:= 50;
end;
ShowMessage('The handle with index:= ' + IntToStr(AnnHandleInfo.Index) + 'was updated' );
ShowMessage('number of handles:= ' + IntToStr(AnnHandleInfo.TotalHandles));
LEADAnn1.AnnEnableEnumerateHandlesEvent:= False;
Result:= SUCCESS_CHANGE;
end;