Solved

CListCtrl drag and drop

Posted on 1997-07-22
3
267 Views
Last Modified: 2013-11-20
Hi all,

I have a drag and drop operation between two list controls.
I'am using CreateDragImage to get the drag image. The problem is , while the mouse is over some point where a drop
operation is not permitted, I need  to change the mouse cursor
to show the user that he cannot drop at that place. Can any one
help me how do i change the Drag Image when the mouse is
over invalid drop targets.
0
Comment
Question by:Ram072297
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
gelbert earned 50 total points
Comment Utility
You shoud call function CImageList::DragLeave() as soon as your cursor is over invalid target. Take a look at sample in VC++ mfc\general\cmnctrls. They have CListCtrl which does exactly what you are looking for.
0
 

Author Comment

by:Ram072297
Comment Utility
hi gelbert,
   Thanks for that . It was very useful. Is it possible to change
the Drag image to some "CROSS" or something like that ??
0
 
LVL 8

Expert Comment

by:gelbert
Comment Utility
Yes. You should just change cursor shape when you do not display Drag-Drop image. You can use SetWindowLong( if you do not do it then when mouse is moved you would see old cursor and when it stays you will see new cursor)  to set new class cursor and SetCursor to change shape of current cursor.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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 discusses moving either the default database or any database to a new volume.

762 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now