mfc >> Change HTREEITEM's parent

by QmVhbkRvZw » Thu, 16 Mar 2006 02:05:27 GMT

I'm writing an app in MFC that has a treeview that can drag/drop onto itself
using OLE drag operations. Point is, at the end I have a function to
implement:

void CMyTreeCtrl::MoveItem(HTREEITEM hToMove, HTREEITEM hNewParent)
{
}


I've looked everywhere in the documentation and all over the web, and I
can't find any documentation on how to make this happen. If possible, I want
to avoid manually cloning the entire tree under hMove inside of hNewParent
and then deleting hMove and its children.

How do you move a treeview item in MFC or Win32?


mfc >> Change HTREEITEM's parent

by Tom Serface » Thu, 16 Mar 2006 02:36:33 GMT


You have to use brute force.... this article might help you:

http://www.codeproject.com/treectrl/movetreeitem.asp

Tom








Similar Threads

1. HTreeItem's parent frame?