View Single Post
Old 2nd July 2007, 20:31   #1
mlipod moderator
(Senior Member)
abu's Avatar
Join Date: Jun 2005
Location: Germany
Posts: 3,457
Handling drag/drop in treeview

I add a new treeview item and several subitems to the ML treeview with ML_IPC_TREEITEM_ADD. Later, I'd like to rearrange the subitems with drag/drop, but I don't know how to do that.
Dragging works fine, and Winamp displays the horizontal "insertion bar" in the TV. But when I drop, I only get a ML_MSG_TREE_ONDROPTARGET. This contains the param of the dragged item, and a POINT. How can I get the target position from that (the tree item after which it was dropped)?

WinAmp Pro 5.5 with ml_iPod 3.10 + dev.patches (download it)
ml_iPod documentation Wiki - ml_iPod FAQ - search ml_iPod forum - iPhone/iTouch - Found a bug?
Donations to support the ml_iPod project can be done HERE
abu is offline   Reply With Quote