English
Source / code snippets

one stuff Laufwerkes Treeview Verzeichnisbaum

 

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  
 




Hubert
Binnewies
I had it Yes gladly tested, but unfortunately have I only XProfan 9.1...sorry...

Hubert
 
WinXP Prof, XProfan 9.1 Newbie

Ein kluger Kopf sagte mal:
"Nach dem derzeitigen Stand der Technik ist es unmöglich Programme zu schreiben, die fehlerfrei laufen!"
04/25/07  
 




Jörg
Sellmeyer
you should not any data immediate reading, separate first with want. means always only The Files read, The straight in the actually Ordner are. otherwise must You too continuing everything update, if itself on the Dateibestand what changes.
unfortunately must one then too so fiese Messages How Click on plus-/Minuszeichen to the Ordner intercepting.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/25/07  
 



You could my addfiles.dll using! These is by a long shot faster and bid likewise Rekursion until Abwinken. task the XProfanprogrammes is then only another Loop to that Befüllen the TreeViews.
 
04/25/07  
 



Übrigens - controls.prf should You to that obigen example already mitliefern - or The DownloadURL indicate.
 
04/25/07  
 




Frank
Abbing
Hm,

soar by me to kurzer Time from with the Error: the element there not. (row 46)

your Solution, The Icons from the Shell32.dll To loading, is imaginable unfit, because the Icons so a code quality display. i'd in each drop The system-Image List using, then erhälst You hochwertige Icons.
In my List view.dll-pkg is my Treeview.dll, The ditto directories in a Treeview listet. look time mere, so should The Icons looks. is too a very speedy Solution, there in Assembler prepares.

Perhaps helps you The Message WM_SETREDRAW, circa your Geschwindogkeit To raise.
 
04/25/07  
 




Thomas
Freier
would have been I me gladly respected.
but unfortunately break any Examples with Error ex.
List view.zipper of March 2007

 
Gruß Thomas
Windows XP SP2, XProfan X2
04/25/07  
 




Frank
Abbing
alas nö... Have The Codes today afternoon still yourself tested. walk tidy XP...
certainly is your Programmeditor not whom suitable way tuned. Probierste time solid Paths or $progdir?
 
04/25/07  
 




Thomas
Freier
faith I you. come but not further.
enclosed the Original with $drive and once with $PROGDIR...https://XProfan.com/images/smiles/6.gif

679 kB
Hochgeladen:04/26/07
Downloadcounter106
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
04/26/07  
 




Frank
Abbing
both Exe functions correct by me. Know not, I there for you do could.
would the Please yet further User testing?
 
04/26/07  
 



@Frank
both DLL - (List view.DLL and Treeview.DLL) funtionieren correct. ultimately are we you often enough on the Wecker gone, because again someone a bow found or a Verbesserungsvorschlag having

in the Image sees one The gleichzeitige Benutzung the both DLL - the Mainwindow shows The List view.dll with all relevanten data on. is in foreground The Treeview.dll active.

256 kB
Kurzbeschreibung: demonstration - Adressor-2
Hochgeladen:04/26/07
Downloadcounter122
Download
 
04/26/07  
 




Carlo
Keil
I suspect a Context with the Verzeichnisstruktur and so with the Recursion.
On my C:-drive (directories and Verzeichnisschachtelungen almost without end) there too The Error Message the element there not..
On my P:-drive (contains only my complete Profan-Entwicklungssystem) works it without Error Message.

Greeting
Carlo
 
04/26/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.398 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