L_LTANN_API L_INT L_AnnSetHyperlink(hObject, uType, uMsg, wParam, pLink, uFlags)
Sets the hyperlink type and parameters of one or more annotation objects.
Handle to the annotation object.
Constant that specifies the object's hyperlink type. Possible values are:
|ANNLINK_NONE||[0x0000] Object has no hyperlink.|
|ANNLINK_LTANNEVENT||[0x0001] WM_LTANNEVENT message will be sent with LTANNEVENT_HYPERLINK|
|ANNLINK_USERMSG||[0x0002] The user defined message will be sent with
|ANNLINK_RUN||[0x0003] The program specified in
|ANNLINK_WEBPAGE||[0x0004] The web page with the URL specified in pLink will be opened in the current browser. Note that not all web browsers accept a page on the command line. Some will simply go to their default home page.|
Value indicating a user defined message that will be sent to the window associated with the annotation object if
uType is ANNLINK_USERMSG. This parameter will be ignored if uType is anything other than ANNLINK_USERMSG.
wParam value that is passed to the user defined message if uType is ANNLINK_USERMSG.
Character string containing the program to run when the object is clicked, if
uType is ANNLINK_RUN. If uType is ANNLINK_WEBPAGE, it is the URL to be accessed by the default browser. This string should be NULL terminated. This parameter is ignored if uType contains any other value.
Flags that determine which objects to process. Most of the flags apply only to container objects. You can combine values when appropriate by using a bitwise OR ( | ). The following are valid values:
|0||Process only the specified object.|
|ANNFLAG_SELECTED||[0x0001] Process only objects that have the selected property set to TRUE. For getting and setting the selected property, use the L_AnnGetSelected and L_AnnSetSelected functions.|
|ANNFLAG_NOTTHIS||[0x0004] Process only one level of objects within the specified container, not the container itself. If there are containers within the container, they are modified, but the objects within them are not.|
|ANNFLAG_RECURSE||[0x0008] Process objects within a container, and within any subcontainers, down to any level.|
|ANNFLAG_NOTCONTAINER||[0x0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves.|
|ANNFLAG_NOINVALIDATE||[0x0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages.|
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
The data pointed to by
pLink is copied. If you dynamically allocated a buffer to hold the data, you should free the string after calling this function.
All objects can be hyperlinked, however, locked objects do not generate hyperlink actions.
Default hyperlink type is ANNLINK_NONE.
For the objects that already have an associated action in run mode (hotspot, button, audio), the hyperlink is processed before their associated action.
Required DLLs and Libraries
L_INT AnnSetHyperlinkExample(HANNOBJECT hAnnObject)
/* change the automation object and all selected objects in the container
to have a webpage hyperlink */
nRet = L_AnnSetHyperlink(hAnnObject, ANNLINK_WEBPAGE, 0, 0, TEXT("https://www.leadtools.com"), 0);
if(nRet != SUCCESS)
/* if you wish to have all objects in the container set with the same hyperlink, uncomment the next line */
/*L_AnnSetHyperlink(hContainer, ANNLINK_WEBPAGE, 0, 0, TEXT("https://www.leadtools.com"), ANNFLAG_RECURSE|ANNFLAG_SELECTED);*/
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries