Asked by:
how to change an item in the list of position control by dragging it (drag and drop)?

-
I have to build a "list control" in which I can insert an item and can change it position by dragging the mouse (drag and drop). I tried the functions "SetItemText (int index, POINT pt) but failed. Anyone have any suggestions? I'm using Visual Studio 6.0.
Sunday, April 25, 2010 11:16 PM
Question
All replies
-
See if the MFC CDragListBox is suitable. It is a list box that supports dragging to rearrange the list.Sunday, April 25, 2010 11:55 PM
-
Here are a few articles -
http://www.codeproject.com/KB/list/dragtest.aspx
http://www.codeproject.com/KB/list/filedroplistctrl.aspx
«_Superman_»
Microsoft MVP (Visual C++)Monday, April 26, 2010 1:35 AM -
If you just want to rearrange items within the same list control take a look at my article on rearranging items in a listbox.
http://www.codeproject.com/KB/combobox/draganddroplistbox.aspx
The concept is exactly the same between the two, you just have to use a CListCtrl base class and the appropriate CListCtrl methods to add and remove items from the list control.
AliMonday, April 26, 2010 1:38 PM -
Thank you. I adapted the program to my needs and worked wonderfully well. It took me to correct some errors but it worked.
Saturday, May 01, 2010 3:03 AM -
Thank you. I adapted the program to my needs and worked wonderfully well. It took me to correct some errors but it worked.
Rogerio
Saturday, May 01, 2010 3:04 AM