Export (0) Print
Expand All

ImageList_BeginDrag function

Begins dragging an image.

Syntax


BOOL ImageList_BeginDrag(
   HIMAGELIST himlTrack,
   int        iTrack,
   int        dxHotspot,
   int        dyHotspot
);

Parameters

himlTrack

Type: HIMAGELIST

A handle to the image list.

iTrack

Type: int

The index of the image to drag.

dxHotspot

Type: int

The x-coordinate of the location of the drag position relative to the upper-left corner of the image.

dyHotspot

Type: int

The y-coordinate of the location of the drag position relative to the upper-left corner of the image.

Return value

Type: BOOL

Returns nonzero if successful, or zero otherwise.

Remarks

This function creates a temporary image list that is used for dragging. In response to subsequent WM_MOUSEMOVE messages, you can move the drag image by using the ImageList_DragMove function. To end the drag operation, you can use the ImageList_EndDrag function.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

Library

Comctl32.lib

DLL

Comctl32.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft