INameSpaceTreeControlDropHandler::OnDragPosition method

Called when the item is being dragged within the same level (within the same parent folder) in the tree.

Syntax


HRESULT OnDragPosition(
  [in] IShellItem      *psiOver,
  [in] IShellItemArray *psiaData,
  [inint             iNewPosition,
  [inint             iOldPosition
);

Parameters

psiOver [in]

Type: IShellItem*

A pointer to an IShellItem interface representing the item underneath the mouse cursor. Optional.

psiaData [in]

Type: IShellItemArray*

A pointer to an IShellItem array containing the items being dragged.

iNewPosition [in]

Type: int

The index if the item being dragged is between items; otherwise, NSTCDHPOS_ONTOP (-1).

iOldPosition [in]

Type: int

The old position.

Return value

Type: HRESULT

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

Remarks

Failing this method prevents the item rearrangment.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

 

 

Show: