How to get dropped file names by using OLE drag and drop in Visual C++ (185572)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q185572 SUMMARY
Traditionally, developers have used the WM_DROPFILES message to handle
files dropped from the File Manager or Windows Explorer. This message is
sent when the user drops a file on the window of an application that has
registered itself as a recipient of dropped files.
OLE drag and drop supports this same functionality. Both techniques involve
passing a global HDROP (drop structure handle) from the source to the
target. WM_DROPFILES passes this handle in the WPARAM value. OLE drag and
drop passes the HDROP with the data object.
This article demonstrates how to get the dropped file names using OLE drag
and drop. The information in this article supplements the following
Microsoft Knowledge Base article:
135299 How to add OLE drag-and-drop functionality to a pre-existing MFC application
Modification Type: | Major | Last Reviewed: | 9/7/2005 |
---|
Keywords: | kbinfo kbClipboard kbDataObject kbDragDrop kbhowto KB185572 kbAudDeveloper |
---|
|