LAnnAutomation::GetAutoCursor

Summary

Gets one of the cursors associated with automated annotations.

Syntax

#include "ltwrappr.h"

virtual L_INT LAnnAutomation::GetAutoCursor(uItem, phCursor)

Parameters

L_UINT uItem

Value that specifies the cursor to be displayed on various actions. Possible values are:

Value Meaning
ANNAUTOCURSOR_DEFAULT [0] Displayed when cursor is over the annotation container, and other action is occurring. The default is the windows predefined cursor IDC_ARROW.
ANNAUTOCURSOR_DRAWNEW [1] Displayed when drawing a new annotation (design mode). This is displayed on all tools except for ANNTOOL_SELECT (which displays the ANNAUTOCURSOR_DEFAULT).
ANNAUTOCURSOR_HANDLE [2] Displayed in design mode, when cursor is over an annotation handle.
ANNAUTOCURSOR_HOTSPOT [3] Displayed in run mode, when cursor over one of the following objects:
ANNOBJECT_BUTTON
ANNOBJECT_HOTSPOT
ANNOBJECT_FREEHANDHOTSPOT
ANNOBJECT_AUDIO
ANNOBJECT_VIDEO
ANNOBJECT_PUSHPIN
ANNAUTOCURSOR_MOVE [4] Displayed in design mode, when an annotation is selected and the cursor is over the selected annotation (but not over the annotation handle).
ANNAUTOCURSOR_SELECT [5] Displayed in design mode, when hovering over an unselected annotation. The default is the windows predefined cursor IDC_IBEAM.
ANNAUTOCURSOR_TEXT [6] Displayed in design mode, when entering text into one of the following text annotations:
ANNOBJECT_TEXT
ANNOBJECT_TEXTPOINTER
ANNOBJECT_RTF
ANNOBJECT_NOTE
The default is the windows predefined cursor IDC_IBEAM.
ANNAUTOCURSOR_WAIT [7] Displayed during any wait operation. The default is the windows predefined cursor IDC_WAIT.

HCURSOR *phCursor

Address of an HCURSOR variable to be updated with the requested annotation cursor.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Call this function to retrieve a copy of one of the annotation cursors. It is the callers responsibility to call DestroyCursor() on the retrieved cursor when finished using the cursor. To customize the annotation cursors, call LAnnAutomation::SetAutoCursor.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

// This sample swaps the Default and Move annotation cursors

L_INT LAnnAutomation_GetAutoCursorExample(LAnnAutomation *plAutomation)  
{ 
   L_INT nRet; 
   HCURSOR hCursorMove, hCursorDefault;  
 
   // Get copy of original cursors 
   nRet = plAutomation->GetAutoCursor(ANNAUTOCURSOR_DEFAULT, &hCursorDefault);  
   if(nRet != SUCCESS) 
      return nRet; 
   nRet = plAutomation->GetAutoCursor(ANNAUTOCURSOR_MOVE, &hCursorMove);  
   if(nRet != SUCCESS) 
      return nRet; 
 
   // Change 
   nRet = plAutomation->SetAutoCursor(ANNAUTOCURSOR_DEFAULT, hCursorMove);  
   if(nRet != SUCCESS) 
      return nRet; 
   nRet = plAutomation->SetAutoCursor(ANNAUTOCURSOR_MOVE, hCursorDefault);  
   if(nRet != SUCCESS) 
      return nRet; 
 
   // Cleanup 
   DestroyCursor(hCursorMove);  
   DestroyCursor(hCursorDefault);  
   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.