Solved

Drag & Drop, wait cursor, and AfxMessageBox problem

Posted on 2003-12-04
2
469 Views
Last Modified: 2013-11-20
The application I am working on requires a custom COleDropSource in order to take specific actions when a file is dropped out of the main window of the application. When the drag & drop occurs, this action may take a few seconds so I show a wait cursor using a CWaitCursor. If an error occurs, I then display a message box showing the error. This is where the problem occurs. The wait cursor does not go away and the user cannot click on the OK button of the message box. In all other cases where I have a wait cursor followed by a message box, the cursor returns to normal. For some reason though, when the cursor is outside the application after doing a drag and drop, the cursor does not return to normal. Does anyone have an idea why this is happening? Thanks.

Jeff
0
Comment
Question by:JeffT
2 Comments
 

Accepted Solution

by:
JeffT earned 0 total points
ID: 9877187
I figured out my own problem. For everyone's reference, it turns out that when you finish a drag and drop operation, a temporary OLE window has the mouse capture. All I had to do was call SetCapture() in my window where I am displaying the message box.

JeffT
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 62
windows 10 how make picture as desktop background 2 58
zeroMAx challenge 20 88
mapBully challenge 6 115
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 (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.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 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

15 Experts available now in Live!

Get 1:1 Help Now