IImageList::SetDragCursorImage method (commoncontrols.h)

Creates a new drag image by combining the specified image, which is typically a mouse cursor image, with the current drag image.

Syntax

HRESULT SetDragCursorImage(
  [in] IUnknown *punk,
  [in] int      iDrag,
  [in] int      dxHotspot,
  [in] int      dyHotspot
);

Parameters

[in] punk

Type: IUnknown*

A pointer to the IUnknown interface that accesses the image list interface, which contains the new image to combine with the drag image.

[in] iDrag

Type: int

A value of type int that contains the index of the new image to combine with the drag image.

[in] dxHotspot

Type: int

A value of type int that contains the x-component of the hot spot within the new image.

[in] dyHotspot

Type: int

A value of type int that contains the x-component of the hot spot within the new image.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

To use IImageList::SetDragCursorImage, specify Comctl32.dll version 6 in the manifest. For more information on manifests, see Enabling Visual Styles.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commoncontrols.h
DLL Comctl32.dll (version 6.0 or later)