Silverfrost Logo About Us | Contact Us
 

GET_MULTIPLE_FILENAMES@

Platform

Win32, x64

Purpose

To access the standard 'open' dialog box.

Syntax

 LOGICAL FUNCTION GET_MULTIPLE_FILENAMES@(HANDLE,  
+ TITLE, FILE, NCHARS, FILTER, PATH, NEXT)
 CHARACTER*(*) TITLE, FILE, FILTER, PATH
 INTEGER HANDLE, NCHARS
 LOGICAL NEXT

Description

This function is an alternative to GET_FILTERED_FILE@ and allows more than one file to be selected. The arguments are as follows.

Description

 

HANDLE:

The Windows handle of the parent window. Use zero for the desktop.

 

TITLE:

The caption for the dialog box.

 

FILE:

The full path returned by the dialog box.

 

NCHARS:

The number of characters in the variable FILE.

 

FILTER:

The description of the file filters (see example below).

 

PATH:

The default path (see example).

 

NEXT:

Set FALSE for the first call then TRUE.

Notes

After this routine has been called, CLEARWIN_INFO@('FILTER_ITEM_SELECTED') provides the index of the file filter that was selected by the user. This can be called, for example, to detect if the file was saved using a different file extension.

Previously 64 bit ClearWin+ used an indirect call to the Windows API whilst 32 bit ClearWin+ used a direct call. Now both 64 bit and 32 bit ClearWin+ use a direct call by default whilst the indirect method is available as an option. The alternative is a little slower but might generally prove to be safer. Make a prior call:

CALL CLEARWIN_OPTION@("alt_open_save")

in order to activate the indirect alternative. The opposite is:

CALL CLEARWIN_OPTION@("-alt_open_save")

Return value

Returns TRUE if another file has been found in the list.

See also

GET_FILTERED_FILE@

Example

 


     WINAPP
     INCLUDE <windows.ins>
     LOGICAL L,next
     CHARACTER*256 filename,filter,defpath
     filter = "Free Fortran files (*.f90)"//char(0)//"*.f90"//char(0) &
               //"All files (*.*)"//char(0)//"*.*"//char(0)//char(0)
     defpath = char(0) !Gives the current working directory
     L = .TRUE.
     next = .FALSE.
     DO WHILE(L)
       filename = char(0)
       L=GET_MULTIPLE_FILENAMES@(0,"Dialog Title",filename,256,filter,defpath,next)
       next = .TRUE. 
       IF(L) PRINT*, trim(filename)
     END DO 
     END

 

 

Copyright © 1999-2018 Silverfrost Limited