This function:
Note: DrgDrag will fail if it is unable to capture the mouse. For example, if another window in the same thread has already set the capture.
Before invoking DrgDrag, the caller is responsible for:
DrgDrag is called when the system-defined direct-manipulation button is pressed while the pointer is over a window and a pointing device movement follows. As the pointer moves over a potential target, a DM_DRAGOVER message is sent to the target. When the pointer moves from one target window to another, a DM_DRAGLEAVE message is sent to the former target.
If the pointer is over a valid target when the direct-manipulation button is released, a DM_DROP message is sent to the target.
Before the DM_DROP message is sent, the cxOffset and cyOffset fields are copied from the DRAGIMAGE structures to the corresponding fields in the DRAGITEM structures. The values from the first DRAGIMAGE are copied to the first DRAGITEM, from the second DRAGIMAGE to the second DRAGITEM, and so on. The target can use this information to place the images in the same spatial relationship after the drop. If there are more DRAGITEM structures than there are DRAGIMAGE structures, the cxOffset and cyOffset from the final DRAGIMAGE are placed in each of the remaining DRAGITEM structures.
The caller can define a default operation for the objects represented by the DRAGINFO structure by modifying the usOperation field. If the usOperation field is modified, the new value will be sent to the target as the operation whenever a DO_DEFAULT operation would normally be sent. The caller should not modify any other part of the DRAGINFO structure. The DRAGITEM structures associated with the DRAGINFO structure should only be altered with DrgSetDragitem or by using a pointer obtained with DrgQueryDragitemPtr.
The following keys are active during the drag operation:
Esc
Once the drag is commenced by calling DrgDrag, neither the image under the pointer nor the objects that comprise the drag set can be modified without canceling the drag and restarting.
On return from DrgDrag, the caller must free the DRAGINFO structure using DrgFreeDraginfo.
If the dragged objects are not dropped, NULL is returned.