AnnSetForeColor example for Delphi
procedure TForm1.TestAnnForeColor ( hAnnObject: HANNOBJECT );
var
crColor: COLORREF; { Object foreground color }
begin
{ Invert the foreground color }
LEADAnn1.AnnGetForeColor ( hAnnObject, crColor );
LEADAnn1.AnnSetForeColor ( hAnnObject, crColor xor $00FFFFFF, False );
end;