Contents Index Topic Contents | ||
Previous Topic: DragFinish Next Topic: DragQueryPoint |
DragQueryFile
Retrieves the file names of dropped files that have resulted from a successful drag-and-drop operation.
Syntax
UINT DragQueryFile( HDROP hDrop, UINT iFile, LPTSTR lpszFile, UINT cch );Parameters
- hDrop
- Identifier of the structure containing the file names of the dropped files.
- iFile
- Index of the file to query. If the value of the iFile parameter is 0xFFFFFFFF, DragQueryFile returns a count of the files dropped. If the value of the iFile parameter is between zero and the total number of files dropped, DragQueryFile copies the file name with the corresponding value to the buffer pointed to by the lpszFile parameter.
- lpszFile
- Address of a buffer to receive the file name of a dropped file when the function returns. This file name is a null-terminated string. If this parameter is NULL, DragQueryFile returns the required size, in characters, of the buffer.
- cch
- Size, in characters, of the lpszFile buffer.
Return Values
When the function copies a file name to the buffer, the return value is a count of the characters copied, not including the terminating null character.
If the index value is 0xFFFFFFFF, the return value is a count of the dropped files.
If the index value is between zero and the total number of dropped files and the lpszFile buffer address is NULL, the return value is the required size, in characters, of the buffer, not including the terminating null character.
See Also
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.