#include "ltwrappr.h"

virtual L_INT LAnnAutomation::GetAutoCursor(uItem, phCursor)

L_UINT uItem;

value that specifies the cursor

HCURSOR *phCursor;

address of an HCURSOR variable

Gets one of the cursors associated with automated annotations.

Parameter Description
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:
  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:
  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.
phCursor Address of an HCURSOR variable to be updated with the requested annotation cursor.



The function was successful.

< 1

An error occurred. Refer to Return Codes.


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


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


Class Members, LAnnAutomation::SetAutoHilightPen, LAnnotation::SetAutoSnapCursor, LAnnotation::GetAutoSnapCursor, LAnnotation::GetOptions, LAnnotation::SetOptions, LAnnAutomation::GetAutoHilightPen


Annotation Functions: Object Properties


Implementing Annotations


Automated User Interface for Annotations


Annotation Functions: Creating and Deleting Annotations


Types of Annotations


Annotation Functions: Implementing Custom Annotations


Annotation Functions: Creating Custom Annotations


Fixed Annotations


Minimizing Flicker With Double Buffering


Annotation Functions: Working with the Toolbar


Key Annotation Features


// 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 
   return SUCCESS; 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help