Comments

When calling L_AnnGetNameOptions, the uFlags field identifies which fields to retrieve. When calling L_AnnSetNameOptions, the uFlags field identifies which fields to set.

When you create an object in the automation mode, the values for bShowName, ptNameOffset, and bNameRestrict are taken from the automation object. The name of the object is also taken from the automation object, specifically from the ANNAUTOTEXT_ITEM_DEFAULTNAME item. This is just like the annotation text, which is by default "AaBbYyZz" and is taken from ANNAUTOTEXT_ITEM_DEFAULTTEXT item.

The default name is ", which means that the objects will not show a name when you create them. To set a default name, call L_AnnSetAutoText with uItem set to ANNAUTOTEXT_ITEM_DEFAULTNAME, and pText set to your desired default string. For example:

The name offset of an annotation object (value pointed to by pNameOffset) is an offset that is relative to the upper left corner of the bounding box of the annotation. The name offset values (pNameOffset.x, pNameOffset.y) are in pixels, where the image is viewed at 100%. The name offset can be changed in any of the following ways:

Right-clicking the object in design-mode, selecting Name Properties, setting the NameOffset using the text box, and clicking Apply.

3.

Clicking on the object name in design-mode and dragging it to a new location.

The name of an annotation object may be restricted so that it fully appears on the bitmap. For example, if the variable pointed to by pbNameRestrict is TRUE for an object, the name offset cannot be set so that the object name is outside the bitmap (annotation container). Suppose you have a 200x200 bitmap with a 100x100 button in the lower right corner. The name of the button is "BUTTON". Attempting to set the name offset to anything larger than (43,100) by any of the above methods will result in the name offset being set to (43,100). Also, dragging the annotation object itself in such a way that would cause the object name to be moved outside the bitmap will cause the name offset to change.

When retrieving the name text, you must first call L_AnnGetNameOptions to determine the length of the character string. Then, you must allocate a character string of this length, and call L_AnnGetNameOptions again.