Compartilhar via


msSiteModeAddJumpListItem method

Adds a new entry to the Jump List of a taskbar button.

 

Syntax

*object.*msSiteModeAddJumpListItem(bstrName, bstrActionUri, bstrIconUri, pvarWindowType)

Parameters

bstrName [in]

Type: BSTR

An entry title that is displayed in the Jump List.

bstrActionUri [in]

Type: BSTR

An absolute or relative URL that opens when the item is clicked.

bstrIconUri [in]

Type: BSTR

An absolute or relative URL of an icon file that is displayed next to the title in the Jump List.

pvarWindowType [in, optional]

Type: VARIANT

A Variant of type String that specifies one of the following values.

self

The link opens in the current tab in the current pinned site window.

tab

Default. The link opens in a new tab in the current pinned site window.

window

The link opens a new pinned site window.

Return value

Type: HRESULT

This method can return one of these values.

Return code Description
E_NOTIMPL

This method is not supported on Windows CE.

 

Remarks

This method dynamically adds items to a custom Jump List. When the user selects a Jump List item, a new browser tab or window opens depending on the value of the pvarWindowType parameter. You must first create a Jump List with IShellUIHelper4::msSiteModeCreateJumpList before adding items to it. Items are not displayed until IShellUIHelper4::msSiteModeShowJumpList is called.

A Jump List can contain up to 20 links into your application and elsewhere; however, the shortcut menu limits the number of items that can be shown at one time. Items are removed from the end of the list to make room for others. If another Jump List item already exists with the same title and action URI, it is moved to the top of the list. If any item matches the title and action URI of an item that has been removed by the user, that item will not be added. To clear information about which items were removed by the user, call IShellUIHelper4::msSiteModeClearJumpList.

The Jump List is always present, regardless of whether the application is currently running. Links on the Jump List must contain enough context to successfully navigate and perform the requested action without application context. To create buttons that are only available when the application is running, and which might be disabled or hidden based on the context of the application, use the Thumbnail Toolbar. For more information, see IShellUIHelper4::msSiteModeShowThumbBar.

The Jump List is designed primarily for dynamic tasks that change as the user interacts with your application. Tasks that do not change frequently can be defined with msapplication-task meta elements. For more information, see IShellUIHelper4::msAddSiteMode.

Examples

The following example creates a Jump List, adds an item to it, and makes it visible.

window.external.msSiteModeCreateJumplist('Recent Videos');
window.external.msSiteModeAddJumpListItem('Video1', 'Video1.htm', 'Images/Video.ico');
window.external.msSiteModeShowJumpList(); 

See also

window

external

Reference

IShellUIHelper4::msSiteModeCreateJumpList

IShellUIHelper4::msSiteModeShowJumpList