Solved

Drag and drop

Posted on 2000-03-15
5
498 Views
Last Modified: 2013-11-20
How do I setup drag and drop between two CListCtrls in a dialog based app?  Ive got the drag working I just need to detect the drop ont the other control.
0
Comment
Question by:boodabelly
5 Comments
 
LVL 5

Expert Comment

by:vachooho
ID: 2620648
see
http://www.codeguru.com/listview/filedroplistctrl.shtml

and

http://www.codeguru.com/listview/DragDropListCtrl.html

Actualy you need only to register your window as DRopTarget, implement IDropTarget interface (which is already implemented in CWnnd-derived classes) and handle drag/drop messages

0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 total points
ID: 2622215
The articles above don't really address the issues.

the first is one to accept dragging of file names from explorer (may help a bit)

the second uses dragging to rearrange items within the list control

I suggest you look at KB artcile:

SAMPLE: MFCDRAG Implements Drag&Drop Between CListCtrl & CTree
ID: Q148738

Although this is between list and tree, it should be not too hard to make it between list and list.

0
 
LVL 1

Author Comment

by:boodabelly
ID: 2636976
RONSLOW,
I just now got to checking out this article but from the sounds of it, it will probably do what I am trying to accomplish.  I have to try and get it to work with a dialog based app, or maybe just change to app.  Ill look at it more closely and see what the best alternative is.  I wil accept the answer if it works.  Thank you.
0
 
LVL 1

Author Comment

by:boodabelly
ID: 2641077
RONSLOW,
Im going to go ahead and accept the answer.  I looked at the example but dont have time to try it out since Ive been handed another project and this one is on the back burner now.

Thanks.
0
 

Expert Comment

by:sulabh120881
ID: 24384315
If I am dropping an item list control to out side the window means in system's folders then how would i get the target path where I am leaving the file.

Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Doc'in system (example?) BA 7 120
fix34  challenge 9 163
"Black Box" Testing of Control System Software 2 89
Capture logon name 13 100
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question