Has anybody a working Drag 'n Drop code example handling notification LVN_BEGINDRAG and using functions


written in C or ASM? (Only DnD inside an application, without OLE stuff)

Posted on 2001-07-27 05:00:07 by japheth

look here : http://betrayed.virtualave.net/cgi-bin/load.cgi?asm/cspy.zip
by: betrayed@betrayed.virtualave.net

inside you find the drag and drop function.

Posted on 2001-07-27 07:15:35 by CodeMonkey
I have been looking for drag and drop code myself.
In Hutch's Windows.inc I could not find the APIs for
ImageList_BeginDrag, ImageList _DragEnter,
ImageList_EndDrag, let alone the description on
how to use them.

J. P. Shankle
Posted on 2001-07-27 08:10:48 by shankle
I have got my app to work now. But I am afraid my work is far from a good solution. It looks very complicated. The only example I found was DragD95.exe from Microsoft (MFC app). And the Imagelist functions are lousy documented. My goal was:

- implement D&D in a listview to allow the user rearrange the items in that listview (only report view, without images)
- if the dragged item is over another item, this item should be hilighted (like in explorer)
- if the dragged item is out of the allowed area, show a "slashed circle"
- do not use any OLE overhead (IDropTarget IDataSource ...)

I have written a small test app (source code attached). Maybe anyone has a good idea to optimize this code.
The relevant parts are:
- handling of LBN_BEGINDRAG
- handling WM_MOUSEMOVE
- handling WM_LBUTTONUP

Posted on 2001-07-28 11:23:53 by japheth