Export (0) Print
Expand All

IImageList::GetDragImage method

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]  PVOID *ppv
);

Parameters

ppt [out]

Type: POINT*

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

pptHotspot [out]

Type: POINT*

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

riid [out]

Type: REFIID

An IID for the image list.

ppv [out]

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

CommonControls.h

IDL

CommonControls.idl

DLL

Comctl32.dll (version 6.0 or later)

 

 

Community Additions

ADD
Show:
© 2015 Microsoft