IImageList::GetDragImage method (commoncontrols.h)

Gets the temporary image list that is used for the drag image. The function also retrieves the current drag position and the offset of the drag image relative to the drag position.

Syntax

HRESULT GetDragImage(
  [out] POINT  *ppt,
  [out] POINT  *pptHotspot,
  [out] REFIID riid,
  [out] void   **ppv
);

Parameters

[out] ppt

Type: POINT*

A pointer to a POINT structure that receives the current drag position. Can be NULL.

[out] pptHotspot

Type: POINT*

A pointer to a POINT structure that receives the offset of the drag image relative to the drag position. Can be NULL.

[out] riid

Type: REFIID

An IID for the image list.

[out] ppv

Type: PVOID*

The address of a pointer to the interface for the image list if successful, NULL otherwise.

Return value

Type: HRESULT

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

Remarks

The temporary image list is destroyed when IImageList::EndDrag is called. To begin a drag operation, use IImageList::BeginDrag.

To use IImageList::GetDragImage, 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)