Главная страница | назад





Article #15638: FileOpen dialog, multiple file selection, BC++ 5.0

 Question and Answer Database

FAQ638C.txt   FileOpen dialog, multiple file selection, BC++ 5.0
Category   :Windows API
Platform    :All Windows
Product    :   BC++5.x

Question:

Why doe the FileOpen common dialog not allow me to pick 
multiple files in BC5 ?

Answer:

You are running under an operating system that does not
support the OFN_EXPLORER flag for the FileOpen dialog
(probably NT 3.51 without the NewShell).  When the FileOpen 
dialog is created with the OFN_ALLOWMULTISELECT flag, the
string returned will contain the filenames delimited by 
spaces and the string itself will be terminated by a '\0' 
character.  Under Win32, spaces are legal characters   
in filenames as are periods.  This makes it very difficult
for a program that supports long filenames to parse this
string.  The OFN_EXPLORER flag when used in conjunction with the
OFN_ALLOWMULTISELECT flag causes the FileOpen dialog 
to return a string where the filenaems are delimtied by the '\0'
character instead of spaces and the string itself is terminated
by '\0\0'.  This flag is not supporteed under NT 3.51.  It is 
supported by Windows95 as well as the NewShell for NT.  A 
workaround for this problem under NT 3.51 is to use FileManager 
to select the files and then drag and drop them onto the Project 
window in BC++ 5.0.

7/2/98 10:32:32 AM
 

Last Modified: 01-SEP-99