Solved

Drag & Drop, wait cursor, and AfxMessageBox problem

Posted on 2003-12-04
2
468 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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

10 Experts available now in Live!

Get 1:1 Help Now