Jump to content
  • Advertisement
Sign in to follow this  
BeanDog

MFC: Change HTREEITEM's parent.

This topic is 4477 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
The only thing I can tell you is to delete the individual item, then re-insert it, specifying the new parent item.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!