Board index » delphi » passing multiple filenames to a program in windows explorer

passing multiple filenames to a program in windows explorer

i'm writing a program in borland delphi 2.0 and know that by adding an key
to the registry, my own item will pop-up on the right-click context menu of
a file. when i click on that it runs my program and passes it the filename
as the first parameter. no problem. the problem i'm having is understanding
how windows explorer passes a multiple selection of files to a program.
originally i thought that it passed each filename (in a multiple selection
of files) as a parameter to the program but it doesn't. how do i pass this
information?

please reply by post and e-mail,
thanks,
darrin
da...@blackboardsoftware.com

 

Re:passing multiple filenames to a program in windows explorer


Quote
darrin wrote:

> i'm writing a program in borland delphi 2.0 and know that by adding an key
> to the registry, my own item will pop-up on the right-click context menu of
> a file. when i click on that it runs my program and passes it the filename
> as the first parameter. no problem. the problem i'm having is understanding
> how windows explorer passes a multiple selection of files to a program.
> originally i thought that it passed each filename (in a multiple selection
> of files) as a parameter to the program but it doesn't. how do i pass this
> information?

Explorer will send a WM_DROPFILES message to you application and you can
process this message using DragQueryFile. Make sure your application has
registered itself as a drop point using DragAcceptFiles.

Jussi Jumppanen
Author of: Zeus for Windows, Win32 (Brief, WordStar, Emacs) Text Editor
"The C/C++, Java, HTML, Pascal, Cobol, Fortran programmers text editor"
Home Page: http://ourworld.compuserve.com/homepages/jussi/

Other Threads