?
Solved

CDragListBox, can't drag to end of list.

Posted on 1997-09-26
2
Medium Priority
?
316 Views
Last Modified: 2013-11-19
I'm using the CDragListBox. I can't drag an item to the end of the list. I have to drop it one up from the end and then drag the last item up above it.  What might I be doing wrong?
0
Comment
Question by:kenraliegh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 800 total points
ID: 1307034
I don't think you're doing anything wrong. Looking at the source for CDragListBox, the virtual function Dropped() is called when you drop the items. However, if you look at the source for the function, there is a call to ItemFromPt() that tries to determine what the source and destination indexes are. If any of them is -1 (which means outside the range), then the function does not do anything. You should override this function in your subclass of CDragListBox and do something more intelligent when you drop it at the bottom.
0
 

Expert Comment

by:zentig
ID: 1307035
A simple but not very elegant solution is to put a blank item at the end of the list. The Dropped() function can be overridden to prevent dropping the blank item if it's dragged. This will ensure that the last item is always blank.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

752 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