Problem with cGetFile()

Post Reply
User avatar
Yannis
Posts: 13
Joined: Fri Oct 07, 2005 2:41 pm
Location: Greece
Contact:

Problem with cGetFile()

Post by Yannis »

Hello everyone !
I have a problem with cGetFile()
Selecting only ONE file, works OK .
When trying to select more files, lets me do it, but it returns ONLY the path of the files!

FWH 2.5 + xHarbour + Borland + Windows XP pro
This is the function i use :

Code: Select all

// Function YGetFile
Function YGetFile(cFileName)
   local cFile,  cFileMask, cTitle
   Local nDefaultMask, cInitDir, nFlags,  cIniFile, lSave
   Local lLongNames
   MemVar oApp

   cTitle       := "Select file"
   cFileMask    := "Jpeg   (*.jpg) |*.jpg|" + ;
                   "Bitmap (*.bmp) |*.bmp|" + ;
                   "Tiff   (*.tif)  |*.tif|" + ;
                   "Gif    (*.gif)  |*.gif|"

   cTitle       := "Select a photo"
   nDefaultMask := 1
   cInitDir     := ".\"
   nFlags       := OFN_ALLOWMULTISELECT + OFN_EXPLORER   // 512 + 524288
   cIniFile     := ""
   cFileName    := ""
   lSave        := .f.
   lLongNames   := .t.

   cFile        := Space(32000)

   //cGetFile( <cFileMask>, <cTitle>, [<nDefaultMask>], [<cInitialDirectory>], [lSave], [lLongNames], [nFlags] )  --> <cFileName>
   cFile := cGetFile(cFileMask,;
                     cTitle,;
                     nDefaultMask,;
                     cInitDir,;
                     lSave,;
                     lLongNames,;
                     nFlags)

   ? cfile

   If Empty(cFile)
      cFile := cFileName
   Endif
Return cFile


Can you help me to solve thsi problem?
Thank you for your help! Smile
Un saludo
Yannis Yannas
www.trinityvision.gr
User avatar
Yannis
Posts: 13
Joined: Fri Oct 07, 2005 2:41 pm
Location: Greece
Contact:

Post by Yannis »

Hello again,
Paco Garcia posted a solution in the Spanish Harbour/xHarbour forum.

Best regards
Yanni Yannas
http://www.trinityvision.gr
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

Dear Yanni,
have you the last release of your chat ?
I wanted insert to it a webcam .
Do you think it is possible ?
User avatar
Yannis
Posts: 13
Joined: Fri Oct 07, 2005 2:41 pm
Location: Greece
Contact:

Post by Yannis »

Sorry Silvio, but i do not have a newer version.
That was a test to learn sockets, at the time.

Best regards
Yannis Yannas
http://www.trinityvision.gr
Post Reply