IVsMenuEditorSite::CreateItem Method (IVsMenuItem^, IVsMenuItem^, IVsMenuItem^)

 

The host is responsible for giving the menu a unique name, and providing back to IVsMenuEditor a valid IVsMenuItem*. As in IVsMenuEditor::AddItem, both IMIParent and pIMIInsertAfter can be NULL.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int CreateItem(
	IVsMenuItem^ pIMIParent,
	IVsMenuItem^ pIMIInsertAfter,
	[OutAttribute] IVsMenuItem^% ppIMINew
)

Parameters

pIMIParent
Type: Microsoft.VisualStudio.Shell.Interop::IVsMenuItem^

[In] A pointer to an object of type IVsMenuItem representing the parent menu item.

pIMIInsertAfter
Type: Microsoft.VisualStudio.Shell.Interop::IVsMenuItem^

[In] A pointer to an object of type IVsMenuItem representing the menu item after which the new items will be inserted.

ppIMINew
Type: Microsoft.VisualStudio.Shell.Interop::IVsMenuItem^

[Out] A pointer to an object of type IVsMenuItem representing the new menu item.

Return Value

Type: System::Int32

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

From vsshell.idl:

[C++]

HRESULT IVsMenuEditorSite::CreateItem(
   [in]IVsMenuItem *pIMIParent, 
   [in]IVsMenuItem *pIMIInsertAfter, 
   [out]IVsMenuItem **ppIMINew
);
Return to top
Show: