Compartir a través de


IVsSelectionEvents.OnSelectionChanged Method

Definition

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

public:
 int OnSelectionChanged(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierOld, System::UInt32 itemidOld, Microsoft::VisualStudio::Shell::Interop::IVsMultiItemSelect ^ pMISOld, Microsoft::VisualStudio::Shell::Interop::ISelectionContainer ^ pSCOld, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierNew, System::UInt32 itemidNew, Microsoft::VisualStudio::Shell::Interop::IVsMultiItemSelect ^ pMISNew, Microsoft::VisualStudio::Shell::Interop::ISelectionContainer ^ pSCNew);
public:
 int OnSelectionChanged(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierOld, unsigned int itemidOld, Microsoft::VisualStudio::Shell::Interop::IVsMultiItemSelect ^ pMISOld, Microsoft::VisualStudio::Shell::Interop::ISelectionContainer ^ pSCOld, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierNew, unsigned int itemidNew, Microsoft::VisualStudio::Shell::Interop::IVsMultiItemSelect ^ pMISNew, Microsoft::VisualStudio::Shell::Interop::ISelectionContainer ^ pSCNew);
int OnSelectionChanged(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierOld, unsigned int itemidOld, Microsoft::VisualStudio::Shell::Interop::IVsMultiItemSelect const & pMISOld, Microsoft::VisualStudio::Shell::Interop::ISelectionContainer const & pSCOld, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierNew, unsigned int itemidNew, Microsoft::VisualStudio::Shell::Interop::IVsMultiItemSelect const & pMISNew, Microsoft::VisualStudio::Shell::Interop::ISelectionContainer const & pSCNew);
public int OnSelectionChanged (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierOld, uint itemidOld, Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect pMISOld, Microsoft.VisualStudio.Shell.Interop.ISelectionContainer pSCOld, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierNew, uint itemidNew, Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect pMISNew, Microsoft.VisualStudio.Shell.Interop.ISelectionContainer pSCNew);
abstract member OnSelectionChanged : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect * Microsoft.VisualStudio.Shell.Interop.ISelectionContainer * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect * Microsoft.VisualStudio.Shell.Interop.ISelectionContainer -> int
Public 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

Parameters

pHierOld
IVsHierarchy

[in] Pointer to the IVsHierarchy interface of the project hierarchy for the previous selection.

itemidOld
UInt32

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

pMISOld
IVsMultiItemSelect

[in] Pointer to the IVsMultiItemSelect interface to access a previous multiple selection.

pSCOld
ISelectionContainer

[in] Pointer to the ISelectionContainer interface to access Properties window data for the previous selection.

pHierNew
IVsHierarchy

[in] Pointer to the IVsHierarchy interface of the project hierarchy for the current selection.

itemidNew
UInt32

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

pMISNew
IVsMultiItemSelect

[in] Pointer to the IVsMultiItemSelect interface for the current selection.

pSCNew
ISelectionContainer

[in] Pointer to the ISelectionContainer interface for the current selection.

Returns

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  
);  

Applies to