LAnnAutomation::GetTextExpandTokens

Summary

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

Syntax

#include "ltwrappr.h"

virtual L_INT LAnnAutomation::GetTextExpandTokens(pbTextExpandTokens)

Parameters

L_BOOL * 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

Value Meaning
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:

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

For example, if you have an LAnnButton 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

Platforms

Win32, x64.

See Also

Functions

Topics

Example

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

L_INT LAnnAutomation_GetTextExpandTokensExample(LAnnAutomation *pLAutomation)  
  
 
{ 
   L_INT nRet; 
 
   L_BOOL bTextExpandTokens;  
  
   L_TCHAR szMsg[200];  
  
 
   nRet = pLAutomation->GetTextExpandTokens(&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);  
 
      nRet = pLAutomation->SetTextExpandTokens(bTextExpandTokens,0);   
      if(nRet != SUCCESS) 
         return nRet; 
   } 
 
   else 
 
   { 
      wsprintf(szMsg, TEXT(" LAnnAutomation::GetTextExpandTokens Failed[%d]"), nRet);  
      MessageBox(NULL, szMsg, TEXT("Error"), MB_OK);  
      return nRet; 
   } 
 
   return SUCCESS; 
} 

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++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.