IToolbar::InsertButton method

The IToolbar::InsertButton method enables a snap-in to add a single button to the toolbar. The button being added is placed at the end of the toolbar.

Syntax


HRESULT InsertButton(
  [inint         nIndex,
  [in] LPMMCBUTTON lpButton
);

Parameters

nIndex [in]

An internal index at which the button will be inserted. The button is always placed at the end of the toolbar; the internal index is required if the button is to be deleted (by means of IToolbar::DeleteButton).

lpButton [in]

A pointer to the MMCBUTTON structure that defines the button to be inserted.

Return value

This method can return one of these values.

S_OK

The button was successfully added to the toolbar.

E_POINTER

The lpButton parameter is NULL.

E_INVALIDARG

An MMCBUTTON item has an invalid image index or NULL button text or tooltip text.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

DLL

Mmcndmgr.dll

See also

IToolbar

 

 

Show: