Partager via


msSiteModeUpdateThumbBarButton method

Changes the state of a Thumbnail Toolbar button.

This method is not supported for Windows apps using JavaScript.

 

Syntax

HRESULT retVal = object.msSiteModeUpdateThumbBarButton(ButtonID, fEnabled, fVisible);

Parameters

  • ButtonID [in]
    Type: VARIANT

    VARIANT of type VT_I4 that specifies the button ID that is returned from IShellUIHelper4::msSiteModeAddThumbBarButton.

  • fEnabled [in]
    Type: VARIANT_BOOL

    A VARIANT_BOOL value that specifies VARIANT_TRUE to enable the button; or VARIANT_FALSE to disable it.

  • fVisible [in]
    Type: VARIANT_BOOL

    A VARIANT_BOOL value that specifies VARIANT_TRUE to make the button visible; or VARIANT_FALSE to hide it.

Return value

Type: HRESULT

This method can return one of these values.

Return code Description
S_OK

The operation completed successfully.

E_INVALIDARG

Argument type not VARIANT of type VT_I4

E_NOTIMPL

This method is not supported on Windows CE.

 

Standards information

There are no standards that apply here.

Remarks

You can use this method to dynamically modify the state of Thumbnail Toolbar buttons. Because all buttons must be added before the Thumbnail Toolbar is displayed, this method gives you control over which buttons are visible or active. Temporarily hide buttons that are not currently needed by setting fVisible to VARIANT_FALSE. You can also configure the buttons to be visible but not active by setting the fEnabled flag to VARIANT_FALSE.

Alternatively, you can replace the button entirely with IShellUIHelper4::msSiteModeAddButtonStyle and IShellUIHelper4::msSiteModeShowButtonStyle.

See also

IShellUIHelper4::msSiteModeAddThumbBarButton