Multi-Pick File Dialog (OpenInsight 32-Bit)
At 22 MAY 2002 07:56:05PM Hank Huizinga wrote:
I am trying to user the utility CHOOSEFILE to pick multiple files. The following code taken from the click event of a button allows me to choose multiple files, but the variable ans only contains the path to the choosen files. If I do not use flag OFN_EXPLORER, the result is correct but short file names are used in the dialog box. Is there any combinbation of flags that will display a long filename and have this function return the selected files?
(OI 4.0.2 on Windows NT, service pack 6)
EQU OFN_READONLY TO 0x1
EQU OFN_OVERWRITEPROMPT TO 0x2
EQU OFN_HIDEREADONLY TO 0x4
EQU OFN_NOCHANGEDIR TO 0x8
EQU OFN_SHOWHELP TO 0x10
EQU OFN_ENABLEHOOK TO 0x20
EQU OFN_ENABLETEMPLATE TO 0x40
EQU OFN_ENABLETEMPLATEHANDLE TO 0x80
EQU OFN_NOVALIDATE TO 0x100
EQU OFN_ALLOWMULTISELECT TO 0x200
EQU OFN_EXTENSIONDIFFERENT TO 0x400
EQU OFN_PATHMUSTEXIST TO 0x800
EQU OFN_FILEMUSTEXIST TO 0x1000
EQU OFN_CREATEPROMPT TO 0x2000
EQU OFN_SHAREAWARE TO 0x4000
EQU OFN_NOREADONLYRETURN TO 0x8000
EQU OFN_NOTESTFILECREATE TO 0x10000
EQU OFN_NONETWORKBUTTON TO 0x20000
EQU OFN_NOLONGNAMES TO 0x40000
EQU OFN_EXPLORER TO 0x80000
EQU OFN_NODEREFERENCELINKS TO 0x100000
EQU OFN_LONGNAMES TO 0x200000
EQU OFN_ENABLEINCLUDENOTIFY TO 0x400000
EQU OFN_ENABLESIZING TO 0x800000
EQU OFN_USEMONIKERS TO 0x1000000
EQU OFN_DONTADDTORECENT TO 0x2000000
EQU OFN_FORCESHOWHIDDEN TO 0x4000000
OI_Mode = 0
OI_Filters = 'All Files (*.*)/*.*/'
OI_FilterIndex =1
OI_InitFile = ''
OI_Flags = OFN_ALLOWMULTISELECT+OFN_EXPLORER
OI_Dir = DRIVE()
ans=Utility('CHOOSEFILE', @Window, OI_Mode:@FM:OI_Filters:@FM:OI_FilterIndex:@FM:OI_InitFile:@FM:OI_Flags:@FM:OI_Dir)
At 24 MAY 2002 01:11PM Bob Carten wrote:
Hank:
Looking into this.
Multiple files are returned as \00\ delimited, which probably confuses our Utility Function.
See the following link for some vbscript that explains what happens.
I intend to put together a script that works in 16 or 32 to answer a Richard Guise posting. Will put it up here, maybe it will help you too.
Bob