The attached zip file shows how to implement a treeview control with drag and drop functionality. I could not find anything similar in 'C' on the web and as this took some time to develop and debug I am posting the code as it may be useful for other members of this forum.
The code is well documented to make it easy to follow. Some functions are rather long and could be simplified by breaking them down into smaller functions if required.
Update
I have updated the tree control so that the drag and drop functionality has been placed in a module.
I have also fixed a bug that caused the program to crash when a branch was dragged onto itself.
Well done !!!
Nice job!
I've never been a big fan of the treeview control but you've added functionality to it that might change that.
Now permanently stored in my burgeoning toolkit of code. ;D
Thank you for sharing.
Thanks CFred! Great work, and excellent comments too.
All I can say is 👍👍👍, it will be in my meager toolbox too.
Even if unused a good example to learn from.
John Z
Thanks !
Nice example for learning purboses.
Hi Fred,
Great job, thanks for sharing.