Sdílet prostřednictvím


IVsMenuEditorSite.CreateItem(IVsMenuItem, IVsMenuItem, IVsMenuItem) Method

Definition

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.

public:
 int CreateItem(Microsoft::VisualStudio::Shell::Interop::IVsMenuItem ^ pIMIParent, Microsoft::VisualStudio::Shell::Interop::IVsMenuItem ^ pIMIInsertAfter, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsMenuItem ^ % ppIMINew);
public:
 int CreateItem(Microsoft::VisualStudio::Shell::Interop::IVsMenuItem ^ pIMIParent, Microsoft::VisualStudio::Shell::Interop::IVsMenuItem ^ pIMIInsertAfter, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsMenuItem ^ &  ppIMINew);
int CreateItem(Microsoft::VisualStudio::Shell::Interop::IVsMenuItem const & pIMIParent, Microsoft::VisualStudio::Shell::Interop::IVsMenuItem const & pIMIInsertAfter, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsMenuItem const & & ppIMINew);
public int CreateItem (Microsoft.VisualStudio.Shell.Interop.IVsMenuItem pIMIParent, Microsoft.VisualStudio.Shell.Interop.IVsMenuItem pIMIInsertAfter, out Microsoft.VisualStudio.Shell.Interop.IVsMenuItem ppIMINew);
abstract member CreateItem : Microsoft.VisualStudio.Shell.Interop.IVsMenuItem * Microsoft.VisualStudio.Shell.Interop.IVsMenuItem * IVsMenuItem -> int
Public Function CreateItem (pIMIParent As IVsMenuItem, pIMIInsertAfter As IVsMenuItem, ByRef ppIMINew As IVsMenuItem) As Integer

Parameters

pIMIParent
IVsMenuItem

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

pIMIInsertAfter
IVsMenuItem

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

ppIMINew
IVsMenuItem

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

Returns

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

Remarks

COM Signature

From vsshell.idl:

[C++]

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

Applies to