Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IMenuButton::SetButton method

The IMenuButton::SetButton method enables a user to set the text attributes of a button in the menu bar that is changed.

Syntax


HRESULT SetButton(
  [inint      idCommand,
  [in] LPOLESTR lpButtonText,
  [in] LPOLESTR lpTooltipText
);

Parameters

idCommand [in]

A value that specifies a user-supplied value that uniquely identifies the button to be added to the menu bar.

lpButtonText [in]

A pointer to the text value (a null-terminated string) to be displayed on the button.

lpTooltipText [in]

A pointer to the text value (a null-terminated string) to be displayed when the user places the mouse pointer on the button.

Return value

This method can return one of these values.

S_OK

The attribute or attributes were successfully set.

E_INVALIDARG

lpButtonText or lpTootipText is NULL.

E_UNEXPECTED

An unexpected error occurred.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

DLL

Mmcndmgr.dll

See also

IMenuButton

 

 

Show: