L_AnnInsertTextTokenTable

Summary

Inserts a text token into the text token table.

Syntax

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnInsertTextTokenTable(hAutomation, pTextToken)

Parameters

HANNOBJECT hAutomation

Handle to the annotation automation object.

pANNTEXTTOKEN pTextToken

Pointer to a structure that defines the text token table to insert.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The text token table is stored in the automation object, so this function is valid only for the ANNOBJECT_AUTOMATION annotation object.

This function inserts a token defined by pTextToken into the text token table. If the token already exists, the existing token is overwritten. If the token does not already exist, it is created.

The text token table can be displayed by performing the following steps:

  1. Right-click on a Button, Note, PushPin, Rubber Stamp, Stamp, Text, or Text Pointer annotation object.
  2. Select Text option in menu that appears.
  3. Click the Insert Token button. A menu for the existing text token table appears, as shown in the following figure:

    tokentable3.gif
  4. Select the token to be inserted.

Note that the text token table above contains a separator. To add a separator, set TextToken as shown in the following code:

ANNTEXTTOKEN TextToken; 
TextToken.nSize = sizeof(ANNTEXTTOKEN); 
TextToken.cToken = 0; 
TextToken.nTokenType = ANNTOKEN_SEPARATOR; 

For a sample that illustrates how to define the text token table depicted above, see the Example.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

This example defines a new user token to display the current date in mm/dd/yyyy format.
It defines a separate token for company name:

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.