1. RE: win32lib getOpenFileName
- Posted by Brian Broker <bkb at cnw.com> Aug 19, 2001
- 469 views
I'm not sure you can easily do this with the current version of Win32Lib. In order to do this, you need to specify the OFN_ALLOWMULTISELECT flag in your OPENFILENAME structure (a change that would need to be done in the lib). Perhaps Derek can provide a 'getOpenFileNameEx' routine that will allow programmers to specify flags. Even then you will need to write your own routine to retrieve the names. Here is a small excerpt from the PSDK: "If the user selects more than one file, the lpstrFile buffer returns the path to the current directory followed by the file names of the selected files. The nFileOffset member is the offset, in bytes or characters, to the first file name, and the nFileExtension member is not used. For Explorer-style dialog boxes, the directory and file name strings are NULL separated, with an extra NULL character after the last file name. This format enables the Explorer-style dialog boxes to return long file names that include spaces." For that much work, we might just want a 'getOpenMultiName' function... -- Brian aku at inbox.as wrote: > How to make user can select mutiple filenames in a dialog box like > using getOpenFileName? ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ > > Thanks