Hyperlink Target ObjectHyperlink Target Object*
*Contents  *Index  *Topic Contents
*Previous Topic: Hyperlink Browse Context Object
*Next Topic: IE4/MSHTML Data Binding Interfaces

Hyperlink Target Object

A hyperlink target is a destination of hyperlink navigation. This can be a persisted OLE object that exposes IHlinkTarget, a persisted OLE object that exposes IOleObject, or any file that is viewed when its viewer application is launched by using ShellExecute.

A hyperlink target can be a top-level container document, an embedded object of arbitrary nesting, or generally any object that can be referenced by using a moniker.

Implementation

If an object (document) wants to be targeted by hyperlinks, it can integrate tightly with OLE hyperlinks by implementing the IHlinkTarget interface. If the object does not support IHlinkTarget, it can still act as a hyperlink target, but it won't be able to support internal navigation, and it will not have access to the common browse context that holds the navigation stack.

An existing OLE document application that supports OLE linking need only implement the IHlinkTarget interface on the same object that implements IPersistFile and IOleItemContainer. The application can also implement IPersistMoniker to support incremental rendering or asynchronous download as a persistence mechanism, rather than IPersistFile. Supporting IHlinkTarget from an OLE document object is the recommended way to make sure your document is viewable by browsers and participates in hyperlinking smoothly.

Creation/Access API Functions

In a document, hyperlink objects implement the IHlink interface. When a user clicks a hyperlink, the application calls IHlink::Navigate, using a helper API function if preferred. The IHlink::Navigate implementation calls BindMoniker to get the pointer of the target object, requests the IHlinkTarget interface, and calls IHlinkTarget::Navigate.

Interfaces
IHlinkTarget Provides for navigation to locations within the target's objects. A hyperlink target object implements this interface for this reason.
IOleObject Allows an embedded object to communicate with and provide basic functionality to its container.


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