Hyperlink ObjectHyperlink Object*
*



Contents  *



Index  *Topic Contents
*Previous Topic: Objects
*Next Topic: Hyperlink Browse Context Object

Hyperlink Object

A hyperlink object is a reference to another location within either a new or existing document. It encapsulates four pieces of reference information:

A hyperlink object also supports the ability to save and load itself by using IPersistStream, and the ability to be transferred through the clipboard or through a drag-and-drop operation by using IDataObject.

It is notable that a document can use the standard hyperlink object to represent hyperlinks within itself, thus encapsulating the work of navigating, saving, loading, dragging, dropping, cutting, and pasting hyperlinks.

Implementation

A standard hyperlink implementation is provided with the operating system, and you should be able to use it for your applications. Custom implementations should be used only with the greatest caution.

Creation/Access API Functions
HlinkCreateFromData Creates a hyperlink object from an object that supports the IDataObject interface (a data object).
HlinkCreateFromMoniker Creates a new hyperlink from a moniker, a location within the target, and a friendly name string (used for displaying the hyperlink).
HlinkCreateFromString Creates a new hyperlink object from strings representing the hyperlink target, the location within the target, and a friendly name.
OleLoadFromStream Allows the hyperlink object to be loaded from persistent data.

Interfaces
IDataObject Enables data transfer.
IHlink Enables a hyperlink (a COM object) to encapsulate the behavior of navigating to its target location.
IHlinkSite Indicates the implemented document/object that contains the hyperlink object. A hyperobject implementation uses this interface (if it's available) for resolving the relative monikers and also to notify before and after the target document/object is displayed.
IPersistStream Provides methods for saving and loading objects that use a simple serial stream for their storage needs.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.