Home COM GDI+ WebBrowser Data Access 

Hyperlinks Objects

 

Objects

 

Hyperlink

Hyperlink Browse Context

 

 

Hyperlink Target

 

Hyperlink Object

 

This object implements, at a minimum, an IHlink interface and acts as a link to an object at another location (the target).

Remarks

A hyperlink object encapsulates four pieces of reference information:

  • A moniker to the hyperlink target.

  • A string for the sublocation within the target.

  • A friendly name for the target.

  • Additional parameters.

 

The 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.

Creation/Access Functions

HlinkCreateFromData

HlinkCreateFromMoniker

HlinkCreateFromString

OleLoadFromStream

Interfaces Implemented

IHlink

IHlinkSite

Object Information

Stock Implementation

hlink.dll

Custom Implementation

No

Header and IDL files

hlink.h, hlink.idl

CLSID

Not available

Minimum availability

Internet Explorer 4.0

Minimum operating systems

Windows 95, Windows NT 4.0

 

Hyperlink Browser Context Object

 

This object implements an IHlinkBrowseContext interface and maintains the navigation stack.

Remarks

In addition to maintaining the navigation stack, the browse context enables Forward and Back buttons, when appropriate. The browse context also maintains window position information. When a user hyperlinks from one window to another, the stored information is used to position each new window on top of the previous one, making it appear as though one window is replacing the other.

Creation/Access Functions

HlinkCreateBrowseContext

Interfaces Implemented

IHlinkBrowseContext

Object Information

Stock Implementation

hlink.dll

Custom Implementation

No

Header and IDL files

hlink.h, hlink.idl

CLSID

Not available

Minimum availability

Internet Explorer 4.0

Minimum operating systems

Windows 95, Windows NT 4.0

 

Hyperlink Target Object

 

This object implements an IHlinkTarget interface and supplies information that other hyperlink objects use to navigate to the target.

Remarks

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.

 

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 Functions

IHlinkTarget::Navigate

Interfaces Implemented

IHlinkTarget

Object Information

Stock Implementation

None

Custom Implementation

No

Header and IDL files

hlink.h, hlink.idl

CLSID

Not available

Minimum availability

Internet Explorer 4.0

Minimum operating systems

Windows 95, Windows NT 4.0

 

Page last updated on Saturday, 07 January 2006 18:16:42 +0100