INameSpaceTreeControl::SetItemState method

Sets state information for a Shell item.

Syntax


HRESULT SetItemState(
  [in]  IShellItem *psi,
  [in]  NSTCITEMSTATE nstcisMask,
  [in]  NSTCITEMSTATE nstcisFlags
);

Parameters

psi [in]

Type: IShellItem*

A pointer to the Shell item for which to set the state.

nstcisMask [in]

Type: NSTCITEMSTATE

Specifies which information is being set, in the form of a bitmap. One or more of the NSTCITEMSTATE constants.

nstcisFlags [in]

Type: NSTCITEMSTATE

A bitmap that contains the values to set for the flags specified in nstcisMask.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The nstcisMask value specifies which bits in the value pointed to by pnstcisFlags are to be set. Other bits are ignored. As a simple example, if nstcisMask=NSTCIS_SELECTED, then the first bit in the nstcisFlags value determines whether that flag is set (1) or removed (0).

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

 

 

Community Additions

ADD
Show:
© 2014 Microsoft