parsing of strings
Posted on 1998-08-02
with the help of the opendialog control I let the user select
several files. I store the selected filenames in a buffer.
How can I now scan this buffer for the selected filenames and
work these filenames in another procedure?
You have to consider that:
a) the user could have selected only 1 file, although the multiselect property
of my opendialog control is set to "TRUE", so you can't be sure before how many
filenames there will be stored in the buffer.
b) unter Windows 95 the user has the option to use the classic DOS 8.3 filenames
and long filenames as well. The parsing routine should be able to handle
both types of filenames.
c) The routine I am searching for should support all 32 Bit versions of Windows.
(i.e. Windows 95, Windows 98 and Windows NT)
To clarify want I want please have a look at the following code. This code code
works perfectly if the multiselect property is set to FALSE. How must I modify
this source code in order to be able to process multiple file selections, too?
(Changing multiselect from TRUE to FALSE won't be the only needed adjustment
in my code :)))) )
rocedure TfrmPrintFile.Button3Click(Sender: TObject);
var filename, s: string;
printer, t: textfile;
if opendialog1.execute then
while not eof(t) do begin
With kind regards