<p>I need to display an error message on rejecting a drop in my application.</p>

<p>I tried this in the <code>OnDrop()</code> but then the source application hangs until my message box is dismissed.</p>

<p>How can I do that?</p>

[{'answer_id': 49191, 'author': 'Nir', 'author_id': 3509, 'author_profile': 'https://Stackoverflow.com/users/3509', 'pm_score': 3, 'selected': True, 'text': '<p>You can always call PostMessage with a private message in the WM_APP range and in the message handler show the error.</p>\n\n<p>That way you show the error after the drag and drop operation is really over and there is no danger of messing up anything.</p>\n'}, {'answer_id': 49201, 'author': 'Agnel Kurian', 'author_id': 45603, 'author_profile': 'https://Stackoverflow.com/users/45603', 'pm_score': 0, 'selected': False, 'text': "<p>You're right. But all the data I need to report in the message box is in the OnDrop.</p>\n"}, {'answer_id': 49236, 'author': 'titanae', 'author_id': 2387, 'author_profile': 'https://Stackoverflow.com/users/2387', 'pm_score': 0, 'selected': False, 'text': '<p>If you need data you can copy it in the OnDrop, store it in some temporary location, then in the WM_APP range message pass the index to the data in temporary location. The handler for the WM_APP message can clean up the temporary data after showing the message box.</p>\n'}]
['https://Stackoverflow.com/questions/49183', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/45603/']