LAnnAutomation::GetAutoCursor
#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: |
|
|
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. |
phCursor |
Address of an HCURSOR variable to be updated with the requested annotation cursor. |
Returns
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
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. |
See Also
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; }