Solved

Drag & Drop, wait cursor, and AfxMessageBox problem

Posted on 2003-12-04
2
473 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Complete beginner needs help making a cron job 9 125
Excel Use VBA to get user's Mac Address for their computer 5 248
mapAB Challlenge 35 157
wordmultiple challenge 12 141
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

837 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