Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ListView - header's icon alignment
Message
 
À
02/09/2005 06:06:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01045162
Message ID:
01046137
Vues:
39
SET LIBRARY TO pdm.fll

loo=CREATEOBJECT("_GetFileEx")
loo.AllowMultiSelect=.T.
loo.Explorer=.T.
loo.EnableSizing=.T.
loo.InitialDir=""
loo.File=""
loo.Title="Get My CSS files"
loo.Filter="My CSS file"+CHR(0)+"*.css"+CHR(0)
loo.aFName="paFiles"

IF GetFileEx(loo) AND loo.Err=0
   lcPom=""
   FOR lii=1 TO loo.iFiles
       lcPom = lcPom+","+loo.SelectedFolder+paFiles(lii)
   NEXT
ENDIF
RELE (loo.aFName)


****************************************************************
* Definiton class _GetFileEx for function GetFileEx()
****************************************************************
DEFINE CLASS _GetFileEx AS custom
   Owner = -1        && HWND      hwndOwner
   Filter =""        && LPCTSTR   lpstrFilter text,*.txt; replace ,; to \0
   FilterIndex = 0   && DWORD     nFilterIndex
   File=""           && LPTSTR    lpstrFile; add \0

*   Instance =0       && HINSTANCE hInstance 
*   CustomFilter = "" && LPTSTR    lpstrCustomFilter; null
*   MaxCustFilter = 0 && DWORD     nMaxCustFilter 
*   FileTitle=""      && LPTSTR    lpstrFileTitle; if empty set null, add \0
*   MaxFileTitle=0    && DWORD     nMaxFileTitle; auto by FileTitle 
*   TemplateName=""   && LPCTSTR   lpTemplateName; if empty set null, add \0 
*   FlagsEx=""        && DWORD     FlagsEx

   MaxFile=2048      && DWORD     nMaxFile; auto by File
   InitialDir=""     && LPCTSTR   lpstrInitialDir; if empty set null, add \0
   Title=""          && LPCTSTR   lpstrTitle; if empty set null add \0
   Flags=0           && DWORD     Flags; 
   FileOffset=0      && WORD      nFileOffset; out for single/multi select
   FileExtension=0   && WORD      nFileExtension; out
   DefExt=""         && LPCTSTR   lpstrDefExt; if empty set null, add \0

*   DIME aFiles(1)    && Array of selected Files
   iFiles=0          && Count of selected files
   SelectedFolder="" && Selected folder for more files 
   aFName=""         && 

   Err=0             && Error Number 

   AllowMultiSelect=.T. 
   CreatePrompt=.F.
   EnableHook=.F.
   EnableIncludeNotify=.F.
   EnableSizing=.T.
   EnableTemplate=.F.
   EnableTemplateHandle=.F.
   Explorer=.T.
   ExtensionDifferent=.F.
   FileMustExist=.F.
   ForceShowHidden=.T.
   HideReadOnly=.T. 
   LongNames=.F.
   NoChangeDir=.F.
   NoDereferenceLinks=.F.
   NoLongNames=.F.
   NoNetworkButton=.F.
   NoReadOnlyReturn=.F.
   NotesFileCreate=.F.
   NoValidate=.F.
   OverWritePrompt=.F.
   PathMustExist=.F.
   ReadOnly=.F.
   ShareWare=.F.
   ShowHelp=.F.
ENDDEFINE
>Hey Martin :-)
>
>I only want to know a single call <lol> I'm on dialup, but that's fine. Anyway (while I'm downloading your sample). I tested with this code:
>
>Set library to pdm0100
>oFiles = CreateObject( 'Custom' )
>oFiles.AddProperty( 'aFName', replicate( chr(0), 255 ))
>?GetFileEx( oFiles )
>
>
>Then when I select a file, it errors out "API call caused an exception". Were you expecting this or I did something wrong ?
>
>>Hi Herman,
>>
>>This FLL is part of PDM (http://gorila.netlab.cz/download/PDM_1.2.0_20050818_source.zip) and PDM use GPL licence :-). Object for calling is in prgs\pdm.prg and example is in __frmmain::getcss() in gui\pdm.vcx
>>
>>MartinJ
>>
>>>Hi Martin,
>>>
>>>Thanks for your wrapper. However it's the source code instead of the FLL. Do you mean that to open source <g> ? Also, I want to test this right away, so how to call the GetFileEx? What should I pass for the object. I don't want to trace your code for just a call :) <bg>
>>>
>>>
>>>>Hi Herman,
>>>>
>>>>You can check my wrapper for GetOpenFileName() and GetSaveFileName(). It's FLL, but...
>>>>
>>>>MartinJ
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform