Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Exposed by the Shell to allow an application to specify the image that will be displayed during a Shell drag-and-drop operation.
Inheritance
The IDragSourceHelper interface inherits from the IUnknown interface. IDragSourceHelper also has these types of members:
Methods
The IDragSourceHelper interface has these methods.
IDragSourceHelper::InitializeFromBitmap Initializes the drag-image manager for a windowless control. |
IDragSourceHelper::InitializeFromWindow Initializes the drag-image manager for a control with a window. |
Remarks
This interface is exposed by the Shell's drag-image manager. It is not implemented by applications.
Use this interface to specify the image displayed during a Shell drag-and-drop operation. The IDragSourceHelper, IDropTargetHelper, and IInitializeWithWindow 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.
The IDragSourceHelper interface provides the following two ways to specify the bitmap to be used as a drag image.
- Controls that have a window can register a DI_GETDRAGIMAGE window message for it and initialize the drag-image manager with IDragSourceHelper::InitializeFromWindow. When the DI_GETDRAGIMAGE message is received, the handler puts the drag image bitmap information in the SHDRAGIMAGE structure that is passed as the message's lParam value.
- Windowless controls can initialize the drag-image manager with IDragSourceHelper::InitializeFromBitmap. This method allows an application to simply specify the bitmap.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |