Multi Select Choose File - Windows Utility (OpenInsight 32-bit Specific)
At 21 JUN 2002 02:55:43AM Herman Smit wrote:
I need to multi-select image files from from a Windows Directory. Utility Function (Choose File) allows a single selection only.
Can someone please help me overcome this hurdle.
If Windows Explorer's Multi file selection can be accessed into a variable, this would solve the problem. Can I call this as a function and how is it achieved?
Alternative solutions would also be very welcome.
Thank You.
At 21 JUN 2002 06:01AM Oystein Reigem wrote:
Herman,
I don't know anything about OI32's Utility functions. I just converted from OI16 to OI32. Or rather I will continue developing with both versions in parallel.
In OI16 I use Sprezzatura's Utility32 product to get access to 32-bit file handling. And I know Sprezzatura's Utility32 can handle multiple selections.
Even if you're on OI32 you might consider acquiring Sprezzatura's Utility32. They've got a 32-bit version ready (i.e, one that can be called from OI32 instead of OI16). I will use that in my OI32 development. One reason is of course I can use the same source for both OI16- and OI32-versions of my app. But also I have positive experiences with the product so far.
Goeie dag my vriend!
- Oystein -
At 21 JUN 2002 11:31AM Richard Hunt wrote:
Herman,
I am no expert in the UTILITY CHOOSEFILE. Although I do know that if you pass a value of 512 in the FLAGS (field 5) it will then allow for for multiple selects.
OPTIONS='
OPTIONS=0
OPTIONS=Exe's (*.exe)/*.exe/"
OPTIONS=1
OPTIONS='
OPTIONS=512
OPTIONS=C:\WINDOWS'
RESULT=UTILITY('CHOOSEFILE',@WINDOW,OPTIONS)
At 21 JUN 2002 01:55PM Hank Huizinga wrote:
I posted this same problem in the works forum. Here's was Revelations response:
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
http://home.att.net/~wshvbs/wshCommonDialogsPage.htm
Here was my original post:
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 23 JUN 2002 06:19AM H Smit wrote:
Oystein, Hank and Richard.
Really appreciate your help here. It works fine.
My problem now is that after having called the Choosefile Utility with the new parameters my Bitmap controls lose their Bitmap displaying ability. Any ideas on that ?
Interestingly one can also pass 1024 in stead of 512 for a different choosefile window.
Oystein please send me your e-mail address.(hermanjs@global.co.za)