?
Solved

CListCtrl drag and drop

Posted on 1997-07-22
3
Medium Priority
?
306 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
[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
3 Comments
 
LVL 8

Accepted Solution

by:
gelbert earned 150 total points
ID: 1302742
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
ID: 1302743
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
ID: 1302744
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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

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