#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnGetText(hObject, pText, puLen)
HANNOBJECT hObject; |
/* handle to the annotation object */ |
L_TCHAR *pText; |
/* address of the character string to be updated */ |
L_SIZE_T *puLen; |
/* address of an integer variable to be updated with text length*/ |
Gets the text (character string) of the specified annotation object.
Parameter |
Description |
hObject |
Handle to the annotation object. |
pText |
Pointer to a character string to be updated with the annotation object's character string. |
puLen |
Pointer to a variable to updated with the text length. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
To use this function:
Declare a variable of type L_SIZE_T and pass the address of the variable as the puLen parameter
Pass NULL for the pText parameter
The length will be returned in the variable *puLen
Allocate a buffer of *puLen + 1
Call the function again passing the address of the buffer for pText
The text of the annotation object is returned in the buffer
Note: The text of the ruler object (which can be retrieved through L_AnnGetText) is the length + unit abbrev. The distance is reset every time the object is changed.
L_AnnGetText can be used to retreive the text from a Rich Text annotation object (ANNOBJECT_RTF). However, no formatting information will be preserved. To retrieve the text with formatting, see L_AnnGetTextRTF.
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. |
Win32, x64.
See Also
Functions: |
L_AnnSetText, L_AnnGetAutoText, L_AnnGetAutoTextLen, L_AnnSetAutoText, L_AnnGetTextFixedSize, L_AnnSetTextFixedSize |
Topics: |
|
|
|
|
|
|
|
|
|
|
Example
For an example, refer to L_AnnSetText.