Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forms Dont Release (COMCTL32 objects)
Message
From
30/09/1998 12:16:54
 
 
To
30/09/1998 11:38:03
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00142378
Message ID:
00142447
Views:
25
Here is the code I'm using with some minor code left out:

PARAMETERS tcPath, tnLevel, tnCount
LOCAL laDirArr[1,1],i,lnTotDir,lnLvl,lnCount,lpkey
LOCAL oTreeView,oNode
LOCAL lcDirectoryName

* Add Items To TreeView Control

lnLvl = lnLvl + 1
lnCount = lnCount + 1

lpKey = LOWER(SUBSTR(tcPath,1,RAT("\", tcPath, 2))) + "_"

oTreeView = ThisForm.tv_DirectoryTree
IF lnCount = 1
oNode = oTreeView.Nodes.Add( , 1, Lower(tcPath) + "_", Lower(tcPath),,)
oNode.Image = "Fixed"
ELSE
lcDirectoryName = SUBSTR(tcPath,RAT("\",tcPath,2) + 1)
lcDirectoryName = SUBSTR(lcDirectoryName,1,LEN(lcDirectoryName)-1)
oNode = oTreeView.Nodes.Add(lpKey, 4, Lower(tcPath) + "_",;
Lower(lcDirectoryName),,)
oNode.Image = "CloseFolder"
ENDIF

Once I execute this code to fill the treeview I cannot properly release the form.
Terry Rooks
Software Systems Architect
Microsoft Certified Solution Developer.Net

If at first you don't succeed, then skydiving definitely isn't for you.
Previous
Reply
Map
View

Click here to load this message in the networking platform