Επεξεργασία

Κοινή χρήση μέσω


INameSpaceTreeControlDropHandler::OnDragPosition method (shobjidl.h)

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,
  [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 containing the items being dragged.

[in] iNewPosition

Type: int

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

[in] iOldPosition

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 rearrangement.

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