English
Source / code snippets

one stuff Laufwerkes Treeview Verzeichnisbaum

 
- Page 1 -



Nico
Madysa

 $H windows.ph
 $H Messages.ph
 $I controls.prf
3 + 4 + 8

proc Add_Dir

    parameters way$ , wrestling% , p&
    declare i%[14] , nextdir$

    if (wrestling% < 0)

        p& = TV_AddItem(tv&,0,2,2,drive  + way$ + \,i#[t%])
        inc wrestling%
        inc t%

    endif

    ClearList
    ClearList lb&[wrestling%]
    AddFiles way$ + \*

    whileloop 0 , %GetCount

        Match $(^~[.+~]$,ListBoxItem$(&loop))

        if %MatchPos >= 0

            AddStrings(lb&[wrestling%],$Match)

        endif

    EndWhile

    DeleteString(lb&[wrestling%],Select String(lb&[wrestling%],(-1),[.]))
    DeleteString(lb&[wrestling%],Select String(lb&[wrestling%],(-1),[..]))
    ClearList
    MoveHandleToList(lb&[wrestling%])
    clear i%[wrestling%]

    while i%[wrestling%] < (GetCount(lb&[wrestling%]))

        nextdir$ = GetString$(lb&[wrestling%],i%[wrestling%])
        nextdir$ = Mid$(nextdir$,2,len(nextdir$) - 2)
        TV_AddItem(tv&,p&,0,1,nextdir$,i#[t%])
        inc t%

        if wrestling% < 14

            Add_Dir (way$ + \ + nextdir$) , (wrestling% + 1) , i#[t% - 1].hItem&

        endif

        i%[wrestling%] = i%[wrestling%] + 1

    wend

endproc

proc terminate

    FreeDLL shl&
    il#.Destroy()
    Dispose il#
    Dispose i#[]
    end

endproc

declare il# , tv& , tx& , shl& , i#[1999] , lb&[14] , t%
Dim i#[] , TV_Item
shl& = UseDll(SHELL32)
cls SysColor(15)
Window Title Please Waiting, create Verzeichnisbaum...

whileloop 15

    lb&[&loop - 1] = Create(ListBox,%hWnd,1,0,0,0,0)

EndWhile

il# = New(ImageList)
il#.AddImage($SysPath + \Shell32.dll,3)
il#.AddImage($SysPath + \Shell32.dll,4)
il#.AddImage($SysPath + \Shell32.dll,8)
tv& = Create(Treeview,%hWnd,il#.hList&,5,5,200,400)
Add_Dir C: , (-1) , 0 <-- here whom Laufwerksbuchstaben/Anfangspfad prompt; on the end must no Backslash stand
TV_Expand tv& , i#[0].hItem&
SetText %hWnd , st$(t%) +  Entries in the Treeview

whilenot IsKey(27)

    waitinput

wend

terminate
end

of these code becomes one Treeview created and through Rekursion (be I proud, I the hinbekommen have! ) with all Verzeichnissen a drive filled. unfortunately is the very umständlich and lasts quite long. therefore have I two ask:
1.) How many Entries contains the Treeview with you maximum? (standing to the loading in the Titelleiste) me goes it therefore, to know, whether The Handles wealthy.
2.) gives not irgendeinen einfacheren lane? in the Win32.hlp have I nothing found and Assembler know I sonderlich from. might to the so speed?

14 kB
Kurzbeschreibung: The benötigte Include
Hochgeladen:04/25/07
Downloadcounter180
Download
 
Nico Madysa
04/25/07  
 



 
- Page 2 -



GDL
by me working it too.

289 kB
Hochgeladen:04/26/07
Downloadcounter178
Download
 
Windows7 Xprofan 8,9,10 [...]  [...] 
04/26/07  
 



Leg simply drives on Horst!

Start → Perform → %comspec% [enter] subst /? [enter]
 
04/26/07  
 




Jörg
Sellmeyer
Hello Horst,
You can the Yes yourself with discretionary many Laufwerken arrange.
simply under Start -> Perform so often Subst M: C:windows prompt To You either sufficient have or the Limit of 26 access is. naturally must the Laufwerksbuchstabe always another and a free drive his. You can also others Ordner as virtuelles drive take but the must not his.

OK, iF was faster
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/26/07  
 



@ iF + Jörg
OK - and How I get The drives again lane ?
 
04/26/07  
 




Jörg
Sellmeyer
Subst /D M:
After one Neustart are but anyhow any again lane.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/26/07  
 



thanks
functions
See Image

124 kB
Hochgeladen:04/26/07
Downloadcounter184
Download
 
04/26/07  
 




Nico
Madysa
OK, first thanks for many Answer.
whom hint with the loading the Ordner if it necessary is, I will In any drop umsetzen (there me already so many people moreover get having )
AddFiles.dll and the Message I will me In any drop too standing.

The Error the element there not. is simply To explain: The code filling The element-Handles the Treeviews into aray, that I temporary on 2000 Handles terminable have, but this is Yes yet erweiterbar. The second Error is me not erklärbar; by the intercepting of wrestling% ought to The maximum Recursion really not overstepped go. But if I The Ordner first to Laufzeit load, had itself the trouble anyhow Done.

@Frank: How do I get on the lever the system-Imagelist? without the komm I sooner badly on The list heran.
 
Nico Madysa
04/27/07  
 



so How I the at Überfliegen seen have could wrestling% not always whom desired object erfüllen. rather with such Rekursionsgeschichten could the following his:
CompileMarkSeparation
04/27/07  
 



 
- Page 3 -



Nico
Madysa
I have with of/ one global variables no Problems, is finally my eigener code.
 
Nico Madysa
04/27/07  
 



@Nico


@Frank: How do I get on the lever the system-Imagelist? without the komm I sooner badly on The list heran.


Frank is apparently not there - geb I you hold operator:
Guck still time in the LISTVIEW-Help under CreateImageList(F,B) to - there standing everything further
 
04/27/07  
 




Frank
Abbing
Nico wills still without Dll make...

goes over The API SHGetFileInfo(), Nico. there get You a Pointer on a copy the SystemImageList. One Pointer the Original goes too, but only over two undokumentierte APIs from the SHELL32. the lass stay. The copy contains too almost any Icons.
 
04/27/07  
 




Nico
Madysa
everything clear, thanks. I Have now incidentally yet ne new idea, The electoral not on whom ChooseDir- separate on whom LoadFile-dialog anzulehnen, speak, eijn List view, instead of one Treeview create. then lasts too the loading not so long.
 
Nico Madysa
05/02/07  
 




Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

20.263 Views

Untitledvor 0 min.
Member 862464104/25/24
Uwe Lang07/02/23
H.Brill01/30/21
RudiB.03/02/20
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie