Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.11.1
LEADTOOLS Raster Imaging C DLL Help

L_AnnGetTextExpandTokens

Show in webframe

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnGetTextExpandTokens(hObject, pbTextExpandTokens)

HANNOBJECT hObject;

/* handle to the annotation object */

L_BOOL *pbTextExpandTokens;

/* address of variable to be updated */

Gets a value that indicates whether the annotation object's text tokens will expand.

Parameter

Description

hObject

Handle to the annotation object

pbTextExpandTokens

Address of the variable to be updated with the object's text expand token property. Possible values are:

 

Value

Meaning

 

TRUE

Text tokens will be expanded for this object.

 

FALSE

Text tokens will not be expanded for this object.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function gets a value that indicates whether the text tokens will be expanded for certain annotation objects that display text. The function is valid only for the following annotation objects:

Calling this function on an object other than one listed above will return ERROR_FEATURE_NOT_SUPPORTED.

If pbTextExpandTokens is updated with TRUE, then all tokens will be expanded.

For example, if you have an ANNOBJECT_BUTTON object that will expand text tokens, and #D is defined to be the current day of the week (ANNTOKEN_DATE_DAY_OF_WEEK), then entering #D for the text of this button will cause it to display the current day of the week when in design or run mode.

Required DLLs and Libraries

LTANN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64.

See Also

Functions:

L_AnnClearTextTokenTable, L_AnnDeleteTextTokenTable, L_AnnEnumerateTextTokenTable, L_AnnInsertTextTokenTable, L_AnnSetTextExpandTokens, L_AnnGetTextFixedSize, L_AnnSetTextFixedSize

Topics:

The Annotation Text Token Table

 

Annotation Functions (Document/Medical only): Text Properties

Example

This sample toggles the 'text token expand' property of an annotation.

 L_INT AnnGetTextExpandTokensExample(HANNOBJECT hObject)
{
   L_BOOL   bTextExpandTokens;
   L_INT    nRet;
   L_TCHAR  szMsg[200];

   nRet = L_AnnGetTextExpandTokens(hObject, &bTextExpandTokens);
   if (nRet == SUCCESS)
   {
      bTextExpandTokens = !bTextExpandTokens;
      wsprintf(szMsg, TEXT("Changing text expand tokens property to %s"),
         bTextExpandTokens ? TEXT("TRUE") : TEXT("FALSE"));
      MessageBox(NULL, szMsg, TEXT(""), MB_OK);
      L_AnnSetTextExpandTokens(hObject, bTextExpandTokens, 0);
   }
   else
   {
      wsprintf(szMsg, TEXT("L_AnnGetTextExpandTokens Failed[%d]"), nRet);
      MessageBox(NULL, szMsg, TEXT("Error"), MB_OK); 
      return nRet;
   }
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.