IMenuButton::SetButton

[This is preliminary documentation and subject to change.]

Enables a user to set the text attributes of a button in the menu bar that is being changed.

HRESULT SetButton(
  int idCommand,  // Specifies a unique user-supplied value
  LPOLESTR lpButtonText
                  // Pointer to the text value for the button
  LPOLESTR lpTooltipText
                  // Pointer to text for the button's tooltip
);
 

Parameters

idCommand
[in] Specifies a user-supplied value that uniquely identifies the button to be added to the menu bar.
lpButtonText
[in] Pointer to the text value (a null-terminated string) to be displayed on the button.
lpTooltipText
[in] Pointer to the text value (a null-terminated string) to be displayed when the user places the mouse pointer on the button.

Return Values

S_OK
The attribute or attributes were successfully set.
E_INVALIDARG
lpButtonText or lpTootipText is NULL.
E_UNEXPECTED
An unexpected error occurred.

See Also

IMenuButton