INameSpaceTreeControlDropHandler::OnDropPosition method (shobjidl.h)

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

Syntax

HRESULT OnDropPosition(
  [in] IShellItem      *psiOver,
  [in] IShellItemArray *psiaData,
  [in] int             iNewPosition,
  [in] int             iOldPosition
);

Parameters

[in] psiOver

Type: IShellItem*

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

[in] psiaData

Type: IShellItemArray*

A pointer to an IShellItem array representing a data object.

[in] iNewPosition

Type: int

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

[in] iOldPosition

Type: int

Specifies 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 rearrangement from happening.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl.h