AnnSetUser method (ILEADRasterAnnotation)

Visual Basic example

Visual C++ 5.0 example

Delphi 4 example

C++ Builder example

 

Syntax

short AnnSetUser(long hObject, BSTR pOldUser, BSTR pNewUser, VARIANT_BOOL bSelected);

Overview

Refer to Implementing Annotation Security.

Remarks

Sets the user string for the specified object.

If the specified object does not have a specified user, set pOldUser to NULL and set pNewUser to the new user string.

To change an object’s user, set pOldUser to the old user string and set pNewUser to the new user string. For any object having a specified user, you must know the old user string in order to change the user.

You can change an object from having a specified user to having no user by setting pOldUser to the old user string and setting pNewUser to NULL.

Please note that when using bSelected to change the user on more than one object, only those objects with a user set to pOldUser will be changed. For example, if you set pOldUser to "YourObject" and set pNewUser to "MyObject", and set bSelected to TRUE, only those objects having user "YourObject" will be changed. Objects with other users, or with NULL users will not be modified.

If the value of the AnnContainer property is passed as the hObject parameter, the method will modify all the annotations in the container depending on the value of bSelected parameter.

If the value of the AnnAutomation property is passed as the hObject parameter, the method will modify the default values used whenever an annotation is created.

See Also

Elements:

AnnLock method, OnAnnLocked event, OnAnnUnlocked event, AnnUnlock method

Topics:

Annotations (Document/Medical only): Annotation Security