Use TreeView_Select Item for the drop source and TreeView_Select DropTarget
for the drop target. You may also want the "track select" style turned on
and use TreeView_Create DragImage for the source item.
Use TreeView_GetIte m, then TreeView_Delete Item and TreeView_Insert Item to
move it. (Using TreeView_GetIte m with all the flags set should get you as
much information as you need to re-insert the item without losing
information.)
This still won't quite be like the menus (it will select an item rather than
show an insertion point between items) but it's probably as near as you are
going to get with a tree.
See "CTreeCtrl, drag and drop operations" in MSDN for more information.
"Lars Grøtteland" <lars@nospam> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hello!
During drag&drop of items in a CTreeView - how do I replace items on the
tree which I drag an item on top of.
We can use the example of WindowsXP. In the start menu -> Programs ->
Startup. I can change places on items in that folder. How can I do that in
the treeview? Anyone know?
--
- Lars