次の方法で共有


IVsMenuEditor Interface

Definition

Exposes the shared menu editor to form designers. You can get an instance of the interface from the IVsMenuEditorFactory interface.

public interface class IVsMenuEditor
public interface class IVsMenuEditor
__interface IVsMenuEditor
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("6FBCB271-B391-4F80-B560-45E650DEF0A7")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsMenuEditor
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("6FBCB271-B391-4F80-B560-45E650DEF0A7")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsMenuEditor
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("6FBCB271-B391-4F80-B560-45E650DEF0A7")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsMenuEditor = interface
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("6FBCB271-B391-4F80-B560-45E650DEF0A7")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsMenuEditor = interface
Public Interface IVsMenuEditor
Attributes

Methods

AddMenuItem(IVsMenuItem, IVsMenuItem, IVsMenuItem)

Adds a new menu item.

DeleteMenuItem(IVsMenuItem)

Deletes the specified menu item.

Filter(IntPtr, UInt32, IntPtr, IntPtr, Int32)

Allows the Menu designer to process a few selected messages that are required to correctly position, paint, and activate the menus.

Filter(IntPtr, UInt32, IntPtr, IntPtr, IntPtr)
GetHeight(Int32)

Can be used by the site to change the size of the host when the user wants to remove the menu. This allows the site an easy way to determine how much to decrease the size of the host.

GetItemRect(IVsMenuItem, RECT[], Int32)

Called to obtain the bounding rectangle for a specific menu item (pmi != NULL) or the bounding rectangle for all currently displayed menu windows (pmi == NULL).

GetUIState(UInt32)

Returns the current UI state of the Menu Editor, giving the site a mechanism to know if the Menu Editor has any UI operations in progress.

IsActive(Int32)

Indicates whether the shared menu is displayed.

OnChange(IVsMenuItem, Int32)

Must be called by IMenuEditorSite if any property known by IVsMenuEditor changes on any menu item.

SelectionChange(IntPtr)

Called whenever the selection changes. If pIMI is null, no menu item is selected. If it is not null, it points to the item to be selected. Only one item can be selected at a time from outside MenuDesigner. This method does not set focus to the item; see the SetFocus method for that behavior.

SelectionChangeFocus(IVsMenuItem)

Same as SelectionChange(IntPtr), except this method also sets focus to the selected item.

TranslateAccelerator(MSG[])

Allows the edit control to catch keystrokes just like an ActiveX control.

Applies to