(Document and Medical Imaging toolkits)
LEADTOOLS provides several functions that allow you to hyperlink annotations. Annotations may be hyperlinked to run a program, access a Web page, or send a user defined message. Hyperlinks are set using L_AnnSetHyperlink. To determine the type of hyperlink associated with an annotation, use L_AnnGetHyperlink. This function also provides you with other information about the hyperlink. If a hyperlink runs a program or accesses a Web page, you can retrieve the name of the program, with all required command line parameters, or you can retrieve the URL of the Web page. To retrieve this information you must first call L_AnnGetHyperlinkLen to determine the length of the string containing this information and allocate a buffer in which to store the string. When working with automated annotations, L_AnnSetHyperlinkMenuEnable lets you enable or disable the displaying of the hyperlink menu item when you click on the right mouse button in design mode. To determine whether the menu item is enabled or disabled, use L_AnnGetHyperlinkMenuEnable.
When implementing automated annotation hyperlinks, (refer to Implementing an Automated Annotation Program), setting L_AnnSetHyperlinkMenuEnable only provides the hyperlink menu item that is seen when you right click on an annotation, while in design mode. You must provide the code for obtaining the hyperlink type, URL, program name and any other required information. Once this information has been obtained, LEADTOOLS will call the default browser or the appropriate program. The Annotate demo provides code for obtaining the required data.
If you are programming non-automated annotations, (refer to Implementing a Non-automated Annotation Program), you must also provide the code for accessing the default browser and calling any executables.