[This is preliminary documentation and subject to change.]
The IMenuButton interface enables the user to add and manage menu buttons for a snap-in. MMC provides one menu bar per view and when a snap-in has focus you can add one or more menu buttons for it to this bar. These buttons are always added by appending them to the buttons already in the menu bar.
You do not implement the IMenuButton interface. It is implemented by the Microsoft Management Console.
You should use the IMenuButton interface whenever your snap-in requires or can benefit from having one or more additional menu buttons in the MMC menu bar for the particular view. To access the IMenuButton interface your snap-in must implement the IExtendControlbar interface. When MMC invokes your IExtendControlbar::SetControlbar it passes an IControlbar interface. You can create an IMenuButton interface by calling the IControlbar::Create method.
IUnknown Methods | Description |
---|---|
QueryInterface | Returns pointers to supported interfaces. |
AddRef | Increments reference count. |
Release | Decrements reference count. |
IMenuButton | Description |
AddButton | Adds a button to the menu bar. |
SetButton | Sets the attributes of a menu bar button. |
SetButtonState | Sets the state of a menu bar button. |