#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnTextEdit (hObject);
HANNOBJECT hObject; |
handle to the text-based annotation object |
This function causes a text-based annotation to enter edit mode.
Parameter |
Description |
hObject |
Handle to the text-based annotation object. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
This function causes a text-based annotation to enter edit mode, which displays an edit window for direct entry of text. Calling this function allows a user to programmatically force an object into edit modean action that is normally available in automation mode when creating or double-clicking text-based annotations.
It can be used with any of the text-based annotations including:
ANNOBJECT_TEXT
ANNOBJECT_TEXTPOINTER
ANNOBJECT_NOTE
ANNOBJECT_PUSHPIN
ANNOBJECT_RTF
A successful call to L_AnnSetText() affects hObject in the following way:
If hObject is not selected, hObject becomes selected, and all other objects become unselected.
If hObject is already selected, then the selection state of all objects is unchanged.
If hObject is one of several objects selected, then the selection state of all objects is unchanged.
Only one object can be in text edit mode. Therefore, if another text object is in text edit mode (hObject2), calling L_AnnTextEdit(), will get hObject2 out of the text edit mode, and put hObject into the text edit mode.
This function will fail with ERROR_AUTOMATION_INV_HANDLE if hObject is not contained in the root container and if it is not in the automated mode.
This function works only with the following objects:
ANNOBJECT_TEXT
ANNOBJECT_TEXTPOINTER
ANNOBJECT_NOTE
ANNOBJECT_PUSHPIN
ANNOBJECT_RTF
If you pass an object that is not one of these types, the function will return ERROR_INV_PARAMETER.
Required DLLs and Libraries
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.
This example programmatically makes an annotation text object hObject go into edit mode. Note that hObject must be a annotation.
L_INT AnnTextEditExample(HANNOBJECT hObject)
{
L_INT nRet = SUCCESS;
L_TCHAR* pszError = NULL;
nRet = L_AnnTextEdit(hObject);
switch(nRet)
{
case SUCCESS:
pszError = NULL;
break;
case ERROR_AUTOMATION_INV_HANDLE:
pszError = TEXT("L_AnnTextEdit failed because you are not in automated mode");
break;
case ERROR_INV_PARAMETER:
pszError = TEXT("L_AnnTextEdit failed because hObject was not text-based");
break;
default:
pszError = TEXT("L_AnnTextEdit failed");
break;
}
if (pszError)
MessageBox(NULL, pszError, TEXT("Error"), MB_OK);
return nRet;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET