Export (0) Print
Expand All

IVsMenuEditor.AddMenuItem Method

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int AddMenuItem (
	[InAttribute] IVsMenuItem pIMI,
	[InAttribute] IVsMenuItem pIMIParent,
	[InAttribute] IVsMenuItem pIMIInsertAfter
)
int AddMenuItem (
	/** @attribute InAttribute() */ IVsMenuItem pIMI, 
	/** @attribute InAttribute() */ IVsMenuItem pIMIParent, 
	/** @attribute InAttribute() */ IVsMenuItem pIMIInsertAfter
)
function AddMenuItem (
	pIMI : IVsMenuItem, 
	pIMIParent : IVsMenuItem, 
	pIMIInsertAfter : IVsMenuItem
) : int

Parameters

pIMI

[in]

pIMIParent

[in]

pIMIInsertAfter

[in]

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From vsshell.idl:

HRESULT IVsMenuEditor::AddMenuItem(
   [in]IVsMenuItem *pIMI, [in]IVsMenuItem *pIMIParent, [in]IVsMenuItem *pIMIInsertAfter);

Only pIMIParent and pIMIInsertAfter can be a null reference (Nothing in Visual Basic) for first item in top-level menu. Otherwise, only pIMIParent or pIMIInsertAfter can be valid

Community Additions

ADD
Show:
© 2014 Microsoft