LAnnotation::SetHyperlink

#include "ltwrappr.h"

virtual L_INT LAnnotation::SetHyperlink(uType, uMsg, wParam, pLink, uFlags=0)

Sets the hyperlink type and parameters of the annotation object.

Parameters

L_UINT uType

Flag that indicates the object's hyperlink type. Possible values are:

Value Meaning
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 wParam as the wParam message of this function and lParam containing the handle of the object.
ANNLINK_RUN [0x0003] The program specified in pLink will be run. Both the program and the command line parameters have to be specified in pLink.
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.

L_UINT uMsg

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 wParam

wParam value that is passed to the user defined message if uType is ANNLINK_USERMSG.

L_TCHAR * pLink

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.

L_UINT uFlags

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:

Value Meaning
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 LAnnContainer::GetSelectItems and LAnnotation::SetSelected 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.

Returns

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

Comments

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.

This function applies to multiple and selected objects based on values of the uFlags parameter.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to LAnnotation::GetHyperlink.

Help Version 20.0.2020.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help