Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CListCtrl drag and drop

Posted on 1997-07-22
3
Medium Priority
?
316 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

618 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