Condividi tramite


CImageList::SetDragCursorImage

Creates a new drag image by combining the given image (typically a mouse cursor image) with the current drag image.

BOOL SetDragCursorImage(
   int nDrag,
   CPoint ptHotSpot 
);

Parameters

  • nDrag
    Index of the new image to be combined with the drag image.

  • ptHotSpot
    Position of the hot spot within the new image.

Return Value

Nonzero if successful; otherwise 0.

Remarks

Because the dragging functions use the new image during a drag operation, you should use the Windows ShowCursor function to hide the actual mouse cursor after calling CImageList::SetDragCursorImage. Otherwise, the system may appear to have two mouse cursors for the duration of the drag operation.

Requirements

Header: afxcmn.h

See Also

Reference

CImageList Class

Hierarchy Chart

CImageList::BeginDrag

CImageList::EndDrag

CImageList::GetDragImage

Other Resources

CImageList Members