Solved

CListCtrl drag and drop

Posted on 1997-07-22
3
298 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
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need a Shell script to start a service checking the port 6 55
Expand LInux Boot partition remotly 3 102
maxBlock challenge 30 145
Work with App store 7 87
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.

680 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