Compartilhar via


IVsUIHierarchyWindow.GetItemState Method

Definition

Returns the state or appearance of the hierarchy.

public:
 int GetItemState(Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy ^ pHier, System::UInt32 itemid, System::UInt32 dwStateMask, [Runtime::InteropServices::Out] System::UInt32 % pdwState);
int GetItemState(Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy const & pHier, unsigned int itemid, unsigned int dwStateMask, [Runtime::InteropServices::Out] unsigned int & pdwState);
public int GetItemState (Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy pHier, uint itemid, uint dwStateMask, out uint pdwState);
abstract member GetItemState : Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy * uint32 * uint32 * uint32 -> int
Public Function GetItemState (pHier As IVsUIHierarchy, itemid As UInteger, dwStateMask As UInteger, ByRef pdwState As UInteger) As Integer

Parameters

pHier
IVsUIHierarchy

[in] IVsHierarchy interface to determine the state or appearance of.

itemid
UInt32

[in] Identifier of the item in the hierarchy. For a list of itemid values, see VSITEMID.

dwStateMask
UInt32

[in] Mask values used to determine which pdwState values are provided. For a list of dwStateMask values, see __VSHIERARCHYITEMSTATE.

pdwState
UInt32

[out, retval] Values taken from the __VSHIERARCHYITEMSTATE enumeration, which were passed in with expf in ExpandItem(IVsUIHierarchy, UInt32, EXPANDFLAGS).

Returns

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIHierarchyWindow::GetItemState(  
   [in] IVsUIHierarchy* pHier,  
   [in] VSITEMID itemid,  
   [in] VSHIERARCHYITEMSTATE dwStateMask,  
   [out, retval] VSHIERARCHYITEMSTATE *pdwState  
);  

Use this method to determine the state of an item in the hierarchy, such as whether the item is expanded, collapsed, bold, or highlighted. Use the ExpandItem method to set the state of an item in the hierarchy.

Applies to