Hi Naomi,
It looks like the code below made it. It looks like a dependancy to shell32 is more robust than older stuff based on comdlg32.dll and msvcrt.dll even provided by MS.
LOCAL pszFilePath,cchFilePath,pszWorkingDir,pszDefExt,pszFilters,szTitle,cFileName
DECLARE INTEGER GetActiveWindow IN win32api
DECLARE INTEGER GetFileNameFromBrowse IN shell32;
INTEGER hwnd,;
STRING @ pszFilePath,;
LONG cchFilePath,;
STRING pszWorkingDir,;
STRING pszDefExt,;
STRING pszFilters,;
STRING szTitle
pszFilePath = REPLICATE(" ",512)+CHR(0)
cchFilePath = LEN(pszFilePath)
pszWorkingDir = STRCONV(myDirectory+CHR(0),5)
pszDefExt = STRCONV("csv"+CHR(0),5)
pszFilters = STRCONV("Text resources"+CHR(0)+"*.txt;*.csv"+CHR(0)+;
"fichiers MS Excel"+CHR(0)+"*.xls"+CHR(0)+CHR(0),5)
szTitle = STRCONV("Open resource"+CHR(0),5)
IF GetFileNameFromBrowse(THISFORM.Hwnd,@pszFilePath,cchFilePath,;
pszWorkingDir, pszDefExt, pszFilters, szTitle) = 0
RETURN
ENDIF
cFilename = STRCONV(pszFilePath,6) && unicode
cFilename = LEFT(cFilename,AT(CHR(0),cFilename)-1)
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only