IVsUIHierarchyWindow::GetItemState Method (IVsUIHierarchy^, UInt32, UInt32, UInt32)
Returns the state or appearance of the hierarchy.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int GetItemState( IVsUIHierarchy^ pHier, unsigned int itemid, unsigned int dwStateMask, [OutAttribute] unsigned int% pdwState )
Parameters
- pHier
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsUIHierarchy^
[in] IVsHierarchy interface to determine the state or appearance of.
- itemid
-
Type:
System::UInt32
[in] Identifier of the item in the hierarchy. For a list of itemid values, see VSITEMID.
- dwStateMask
-
Type:
System::UInt32
[in] Mask values used to determine which pdwState values are provided. For a list of dwStateMask values, see __VSHIERARCHYITEMSTATE.
- pdwState
-
Type:
System::UInt32
[out, retval] Values taken from the __VSHIERARCHYITEMSTATE enumeration, which were passed in with expf in ExpandItem.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.