DrgSetDragImage
Appearance
This function sets the image that is being dragged.
Syntax
DrgSetDragImage(pdinfo, pdimg, cdimg, pRsvd)
Parameters
- pdinfo (PDRAGINFO) - input
- Pointer to the DRAGINFO structure representing the drag operation for which the pointer is to be set.
- pdimg (PDRAGIMAGE) - input
- Pointer to an array of DRAGIMAGE structures.
- These structures describe the images to be drawn under the pointer during the drag.
- cdimg (ULONG) - input
- Number of DRAGIMAGE structures in the pdimg array.
- pRsvd (PVOID) - input
- Reserved value, must be NULL.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE - Successful completion.
- FALSE - Error occurred.
Remarks
The image that is set with DrgSetDragImage is used only while the pointer is over the target that made the call. If the pointer leaves the original target, the new target can specify an image by calling DrgSetDragImage. If the new target does not call DrgSetDragImage, the original image that was supplied on the call to DrgDrag is used.
Errors
Possible returns from WinGetLastError:
- PMERR_ACCESS_DENIED (0x150D)
- The memory block was not allocated properly.
- PMERR_INVALID_PARAMETERS (0x1208)
- An application parameter value is invalid for its converted PM type. For example: a 4-byte value outside the range -32 768 to +32 767 cannot be converted to a SHORT, and a negative number cannot be converted to a ULONG or USHORT.
- PMERR_INSUFFICIENT_MEMORY (0x203E)
- The operation terminated through insufficient memory.