LAnnotation::SetHyperlink

#include "ltwrappr.h"

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

L_UINT uType;

the object's hyperlink type

L_UINT uMsg;

a user defined message

WPARAM wParam;

wParam value that is passed to the user defined message

L_TCHAR * pLink;

the name of the program to run or the web page to access

L_UINT uFlags;

flags that determine which objects to process

Sets the hyperlink type and parameters of the annotation object.

Parameter Description
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.
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 value that is passed to the user defined message if uType is ANNLINK_USERMSG.
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.
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

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

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.

Platforms

Win32, x64.

See Also

Functions:

Class Members

Topics:

Annotation Functions: Hyperlinks

Example

For an example, refer to LAnnotation::GetHyperlink.

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