다음을 통해 공유


IVsSelectionEvents.OnSelectionChanged Method

Reports that the project hierarchy, item and/or selection container has changed.

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

Syntax

‘선언
Function OnSelectionChanged ( _
    pHierOld As IVsHierarchy, _
    itemidOld As UInteger, _
    pMISOld As IVsMultiItemSelect, _
    pSCOld As ISelectionContainer, _
    pHierNew As IVsHierarchy, _
    itemidNew As UInteger, _
    pMISNew As IVsMultiItemSelect, _
    pSCNew As ISelectionContainer _
) As Integer
‘사용 방법
Dim instance As IVsSelectionEvents
Dim pHierOld As IVsHierarchy
Dim itemidOld As UInteger
Dim pMISOld As IVsMultiItemSelect
Dim pSCOld As ISelectionContainer
Dim pHierNew As IVsHierarchy
Dim itemidNew As UInteger
Dim pMISNew As IVsMultiItemSelect
Dim pSCNew As ISelectionContainer
Dim returnValue As Integer

returnValue = instance.OnSelectionChanged(pHierOld, _
    itemidOld, pMISOld, pSCOld, pHierNew, _
    itemidNew, pMISNew, pSCNew)
int OnSelectionChanged(
    IVsHierarchy pHierOld,
    uint itemidOld,
    IVsMultiItemSelect pMISOld,
    ISelectionContainer pSCOld,
    IVsHierarchy pHierNew,
    uint itemidNew,
    IVsMultiItemSelect pMISNew,
    ISelectionContainer pSCNew
)
int OnSelectionChanged(
    [InAttribute] IVsHierarchy^ pHierOld, 
    [InAttribute] unsigned int itemidOld, 
    [InAttribute] IVsMultiItemSelect^ pMISOld, 
    [InAttribute] ISelectionContainer^ pSCOld, 
    [InAttribute] IVsHierarchy^ pHierNew, 
    [InAttribute] unsigned int itemidNew, 
    [InAttribute] IVsMultiItemSelect^ pMISNew, 
    [InAttribute] ISelectionContainer^ pSCNew
)
function OnSelectionChanged(
    pHierOld : IVsHierarchy, 
    itemidOld : uint, 
    pMISOld : IVsMultiItemSelect, 
    pSCOld : ISelectionContainer, 
    pHierNew : IVsHierarchy, 
    itemidNew : uint, 
    pMISNew : IVsMultiItemSelect, 
    pSCNew : ISelectionContainer
) : int

Parameters

  • itemidOld
    Type: System.UInt32

    [in] Identifier of the project item for previous selection. For valid itemidOld values, see VSITEMID.

  • itemidNew
    Type: System.UInt32

    [in] Identifier of the project item for the current selection. For valid itemidNew values, see VSITEMID.

Return Value

Type: System.Int32

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSelectionEvents::OnSelectionChanged(
   [in] IVsHierarchy *pHierOld,
   [in] VSITEMID itemidOld,
   [in] IVsMultiItemSelect *pMISOld,
   [in] ISelectionContainer *pSCOld,
   [in] IVsHierarchy *pHierNew,
   [in] VSITEMID itemidNew,
   [in] IVsMultiItemSelect *pMISNew,
   [in] ISelectionContainer *pSCNew
);

Permissions

See Also

Reference

IVsSelectionEvents Interface

IVsSelectionEvents Members

Microsoft.VisualStudio.Shell.Interop Namespace