Seite 1 von 1

ListViewGadget als ExplorerListGadget light

Verfasst: 17.05.2007 23:30
von Kiffi
Hallo,

bin gerade durch Zufall darauf gestoßen, dass man ein ListViewGadget via
simplen SendMessage mit den Dateinamen eines Ordners befüllen
kann. Ich persönlich habe aktuell keinen Einsatzzweck für sowas, aber
vielleicht kann's jemand von Euch gebrauchen:

Code: Alles auswählen

#LB_DIR = $18D
#DDL_ARCHIVE = $20
#DDL_EXCLUSIVE = $8000
#DDL_FLAGS = #DDL_ARCHIVE | #DDL_EXCLUSIVE

If OpenWindow(0, #PB_Ignore, #PB_Ignore, 200, 300, "")

  If CreateGadgetList(WindowID(0))
    
    ListViewGadget(0,5,5,190,290)
    SendMessage_(GadgetID(0), #LB_DIR, #DDL_FLAGS, "C:\*.*")
    
    Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
    
  EndIf
  
EndIf
Grüße ... Kiffi

Verfasst: 17.05.2007 23:37
von hardfalcon
Praktisch, praktisch...
Hier noch eine Lsite der verschiedenen Flags, die man benutzen kann:
(Quelle: http://msdn.microsoft.com/library/defau ... lb_dir.asp)
MSDN hat geschrieben:DDL_ARCHIVE
Includes archived files.
DDL_DIRECTORY
Includes subdirectories. Subdirectory names are enclosed in square brackets ([ ]).
DDL_DRIVES
All mapped drives are added to the list. Drives are listed in the form [-x-], where x is the drive letter.
DDL_EXCLUSIVE
Includes only files with the specified attributes. By default, read-write files are listed even if DDL_READWRITE is not specified.
DDL_HIDDEN
Includes hidden files.
DDL_READONLY
Includes read-only files.
DDL_READWRITE
Includes read-write files with no additional attributes. This is the default setting.
DDL_SYSTEM
Includes system files.

Verfasst: 17.05.2007 23:42
von Kiffi
Danke, hardfalcon :allright:

Mit den zusätzlichen Flags wird das ExplorerListGadget light ja zum
ExplorerListGadget light deluxe ;-)

Grüße ... Kiffi