Shell Interfaces


IDropTargetHelper Interface

Exposes methods that allow drop targets to display a drag image while the image is over the target window.

IDropTargetHelper Members

DragEnter Notifies the drag-image manager that the drop target's IDropTarget::DragEnter method has been called.
DragLeave Notifies the drag-image manager that the drop target's IDropTarget::DragLeave method has been called.
DragOver Notifies the drag-image manager that the drop target's IDropTarget::DragOver method has been called.
Drop Notifies the drag-image manager that the drop target's IDropTarget::Drop method has been called.
Show Notifies the drag-image manager to show or hide the drag image.

Remarks

This interface is exposed by the Shell's drag-image manager. It is not implemented by applications.

This interface is used by drop targets to enable the drag-image manager to display the drag image while the image is over the target window. The IDragSourceHelper and IDropTargetHelper interfaces are exposed by the drag-image manager object to allow the IDropTarget interface to use custom drag images. To use either of these interfaces, you must create an in-process server drag-image manager object by calling CoCreateInstance with a class identifier (CLSID) of CLSID_DragDropHelper. Get interface pointers using standard Component Object Model (COM) procedures.

Four of the IDropTargetHelper methods correspond to the four IDropTarget methods. When you implement IDropTarget, each of its methods should call the corresponding IDropTargetHelper method to pass the information to the drag-image manager. The fifth IDropTargetHelper method notifies the drag-image manager to show or hide the drag image. This method is used when dragging over a target window in a low color-depth video mode. It allows the target to hide the drag image while it is painting the window.

Note   The drag-and-drop helper object calls IDataObject::SetData to load private formats—used for cross-process support—into the data object. It later retrieves these formats by calling IDataObject::GetData. To support the drag-and-drop helper object, the data object's SetData and GetData implementations must be able to accept and return arbitrary private formats.

For further discussion of Shell drag-and-drop operations, see Transferring Shell Data Using Drag-and-Drop or the Clipboard.

Note  Windows Vista and later. Prior to Windows Vista this interface was declared in Shlobj.h.

Interface Information

Minimum DLL Versionshell32.dll version 5.0 or later
Custom ImplementationYes
Inherits fromIUnknown
Header and IDL filesshobjidl.h, shobjidl.idl
Minimum operating systems Windows 2000, Millennium

See Also

IDragSourceHelper
Tags :


Page view tracker