Article ID: 139067 - Last Review: July 11, 2005 - Revision: 2.3 SAMPLE: FileDrag.exe Supports File Drag Server CapabilitiesThis article was previously published under Q139067 SUMMARY
FileDrag.exe is a sample that shows how an application can provide the File
Drag drop server capabilities. The sample shows how to set up the data
structures for CF_HDROP and ShellIDList formats. In this sample, the user
can enable support for any combination of CF_HDROP and ShellIDList format
and see the drag drop result.
MORE INFORMATIONThe following file is available for download from the Microsoft Download Center: FileDrag.exe
(http://download.microsoft.com/download/platformsdk/sample20/1/w351/en-us/filedrag.exe)
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591
(http://support.microsoft.com/kb/119591/EN-US/
)
How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.
In Windows 3.x, the only application that could act as a File Drag-Drop server was File Manager. Now the file drag-drop server capability is extended to all applications through OLE Drag Drop. An OLE drag-drop server application that supports the CF_HDROP format can support file drag drop as does File Manager. The Windows system generates the appropriate WM_DROPFILES message for client applications that support File Drop, or the Windows system passes the IDataObject if the client application supports OLE Drop target for CF_HDROP format. One of the new features of the shell is that you can drop files on a desktop icon. The Shell opens the particular application with the drop file in it, provided the application supports command line arguments where file can be passed. For example: notepad.exe myfile.txt NOTE: When you drag and drop a file from this sample, it leaves the files in the temp directory. The files are named myfile0.txt and myfile1.txt. These files are not deleted because they might by used by the other application (on which they are dropped). You can delete the files later on when you are done. The directory of these files is same as the directory defined by the TEMP environment variable. FileDrag.exe contains the following files: File Name Description ------------------------------------------------------------------------ IDataObj.cpp Data Object Interface Implementation. IDropSrc.cpp Drop Source Interface Implementation. OLEInit.cpp OLE initialize/uninitialize Implementation. IeNumFe.cpp FORMATETC Enumertator Interface Implementation. DrgDrps.CPP Drag drop Main application implementation. RenderData.cpp Functions to Format Data to Global handles. DrgDrps.H Drag drop Main application prototypes. IDataObj.h Data Object Interface prototypes. IDropSrc.h Drop Source Interface prototypes. IENumFe.h FORMATETC Enumertator Interface prototypes. OLEInit.h OLE initialize/uninitialize prototypes. Resource.h Resource header file. RenderData.h Functions definitions for Format Data to Global handles. Pidl.dll Helper DLL for Pidl manipulation functions. DrgDrps.def Def file. FileDrag.mak Make file. DrgDrps.bmp Bitmap file. DrgDrps.ico Icon file. DrgDrps.rc Resource file. Pidl\DllMain.c DLL initialization functions. Pidl\Globals.h Global variables and prototypes. Pidl\Pidl.cpp Pidl helper functions implementation. Pidl\Pidl.h Pidl helper functions prototypes. Pidl\Pidl.def Def file for the DLL.
| Article Translations
|
Back to the top
