#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnSetAutoText(hObject, uItem, pText)
Sets the character string for a menu or dialog box item associated with automated annotations.
Handle to the annotation automation object.
Constant that specifies the menu or dialog box item, which appears when the user presses the right mouse button. For lists of constants and their default values, refer to the following:
Character string to use for the menu or dialog box item.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
To retrieve the character string for a menu item or dialog box item, use L_AnnGetAutoTextLen to determine the length of the string and to allocate a buffer of appropriate size. Then call L_AnnGetAutoText to retrieve the string.
When you call L_AnnSetAutoText, if you pass an empty string, the menu item defined by uItem
will be disabled and removed from the automation menu. To re-enable the menu item, call L_AnnSetAutoText and pass a valid string.
If hObject
is NULL, the automation strings are changed for all the automation objects that will be created from this point on. It also changes the strings for the automation objects that have not overwritten the specified string.
If hObject is not NULL, the string is overwritten only for the specified automation object. Some programs create a new automation object each time a file is opened. This is especially true for MDI applications. In this case, the string is set only for the current file. If you want this string to be set for all files, you must set the string each time you create a new automation object, or call L_AnnSetAutoText with hObject set to NULL.
To reset a string used in the annotation toolbar menus, you must call L_AnnSetAutoText with hObject
sett to NULL, since the annotation toolbar is not tied to a specific automation object.
Required DLLs and Libraries
Win32, x64.
This example changes the text for selecting the line style.
L_INT AnnSetAutoTextExample(HANNOBJECT hAutoObject)/* Automation object */
{
L_INT nRet;
nRet = L_AnnSetAutoText(hAutoObject, ANNAUTOTEXT_LINE_SOLID , TEXT("Solid line"));
if(nRet != SUCCESS)
return nRet;
nRet = L_AnnSetAutoText(hAutoObject, ANNAUTOTEXT_LINE_DASH , TEXT("Dash (_ _ _ _)"));
if(nRet != SUCCESS)
return nRet;
nRet = L_AnnSetAutoText(hAutoObject, ANNAUTOTEXT_LINE_DOT , TEXT("Dot (. . . .)"));
if(nRet != SUCCESS)
return nRet;
nRet = L_AnnSetAutoText(hAutoObject, ANNAUTOTEXT_LINE_DASHDOT , TEXT("Dash dot (_._._)"));
if(nRet != SUCCESS)
return nRet;
nRet = L_AnnSetAutoText(hAutoObject, ANNAUTOTEXT_LINE_DASHDOTDOT, TEXT("Dash dot dot (_.._.._)"));
if(nRet != SUCCESS)
return nRet;
nRet = L_AnnSetAutoText(hAutoObject, ANNAUTOTEXT_LINE_NULL , TEXT("Invisible line"));
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document