Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Drag & Drop, wait cursor, and AfxMessageBox problem

Posted on 2003-12-04
2
Medium Priority
?
478 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
[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 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

719 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