IShellUIHelper4::msSiteModeUpdateThumbBarButton Method

New for Windows Internet Explorer 9

Changes the state of a Thumbnail Toolbar button.


HRESULT msSiteModeUpdateThumbBarButton(
    VARIANT ButtonID,
    VARIANT_BOOL fEnabled,
    VARIANT_BOOL fVisible


[in] VARIANT of type VT_I4 that specifies the button ID that is returned from msSiteModeAddThumbBarButton.
[in] A VARIANT_BOOL value that specifies VARIANT_TRUE to enable the button; or VARIANT_FALSE to disable it.
[in] A VARIANT_BOOL value that specifies VARIANT_TRUE to make the button visible; or VARIANT_FALSE to hide it.

Return Value

Returns one of the following values.

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.


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 msSiteModeAddButtonStyle and msSiteModeShowButtonStyle.

See Also


Community Additions

© 2014 Microsoft