[This is preliminary documentation and subject to change.]
Enables a user to add a button to the MMC menu bar for a particular view.
HRESULT AddButton(
int idCommand, // Specifies a unique user-supplied value
LPOLESTR lpButtonText
// Pointer to the text value for the button
LPOLESTR lpTooltipText
// Pointer to the text value for the button's
// tooltip
);
Buttons added to the MMC menu bar for a particular view are always appended to the buttons already present. The initial state of a menu button is hidden and disabled.
When the snap-in loses focus, these buttons are automatically removed from the menu bar. As a result, they must be added each time the snap-in gets focus.
This method can be called by primary or extension snap-ins.