IShellUIHelper4::msSiteModeAddButtonStyle Method

New for Windows Internet Explorer 9

Defines an alternate icon image and tooltip for the specified button.

Syntax

HRESULT msSiteModeAddButtonStyle(
    VARIANT uiButtonID,
    BSTR bstrIconUrl,
    VARIANT *pvarTooltip,
    VARIANT *pvarStyleID
);

Parameters

  • uiButtonID
    [in] The ID of a button that is previously installed with msSiteModeAddThumbBarButton.
  • bstrIconUrl
    [in] An absolute or relative URI of an icon resource.
  • pvarTooltip
    [in] A description of the button.
  • pvarStyleID
    [out, retval] Recieves the ID of the new button style.

Return Value

Returns one of the following values.

S_OK The operation completed successfully.
E_NOTIMPL This method is not supported on Windows CE.

Remarks

A button style consists of an additional icon and tooltip for a button position. The msSiteModeAddButtonStyle method only creates button styles; to apply them, call msSiteModeShowButtonStyle. The original icon and tooltip are automatically saved as Style 0 and do not need to be added again.

The button returns the same button ID no matter which button style is displayed. To perform the correct action, your application will need to retain the button state internally.

The icon is downloaded asynchronously. If the download fails, a blank button is used instead.

See Also

IShellUIHelper4::msSiteModeAddThumbBarButton, IShellUIHelper4::msSiteModeShowButtonStyle