Udostępnij za pośrednictwem


Metoda IVsUIShell.ShowContextMenu — (UInt32, Guid, Int32, POINTS , IOleCommandTarget)

 

Pokazuje menu kontekstowe dla obiektu aktywne menu.

Przestrzeń nazw:   Microsoft.VisualStudio.Shell.Interop
Zestaw:  Microsoft.VisualStudio.Shell.Interop (w Microsoft.VisualStudio.Shell.Interop.dll)

Składnia

int ShowContextMenu(
    uint dwCompRole,
    [InAttribute] ref Guid rclsidActive,
    int nMenuId,
    POINTS[] pos,
    IOleCommandTarget pCmdTrgtActive
)
int ShowContextMenu(
    unsigned int dwCompRole,
    [InAttribute] Guid% rclsidActive,
    int nMenuId,
    array<POINTS>^ pos,
    IOleCommandTarget^ pCmdTrgtActive
)
abstract ShowContextMenu : 
        dwCompRole:uint32 *
        rclsidActive:Guid byref *
        nMenuId:int *
        pos:POINTS[] *
        pCmdTrgtActive:IOleCommandTarget -> int
Function ShowContextMenu (
    dwCompRole As UInteger,
    <InAttribute> ByRef rclsidActive As Guid,
    nMenuId As Integer,
    pos As POINTS(),
    pCmdTrgtActive As IOleCommandTarget
) As Integer

Parametry

  • rclsidActive
    Type: System.Guid

    [in] Określa identyfikator GUID menu kontekstowego w pliku .ctc.

  • nMenuId
    Type: System.Int32

    [in] Identyfikator menu kontekstowego, aby pokazać z pliku .ctc.

Wartość zwracana

Type: System.Int32

Jeśli metoda zakończy się pomyślnie, zwraca S_OK. Jeśli nie, zwraca kod błędu.

Uwagi

Podpis COM

Z vsshell.idl:

HRESULT IVsUIShell::ShowContextMenu(
   [in] DWORD dwCompRole,
   [in] REFCLSID rclsidActive,
   [in] LONG nMenuId,
   [in] REFPOINTS pos,
   [in] IOleCommandTarget *pCmdTrgtActive
);

Wszystkie polecenia są najpierw przesyłane do IOleCommandTarget przekazany pCmdTrgtActive.

Zobacz też

Interfejs IVsUIShell
Przestrzeń nazw Microsoft.VisualStudio.Shell.Interop

Powrót do początku