can somebody point me the correct way for a treeview ?
what i want is ..
-O react on somethin
|
|--O react on somethin
|
|--O react on somethin
|
|--O react on somethin
but all of them should react on somethin different
so far so good
actually i got stuck here :(
.elseif uMsg==WM_NOTIFY
mov edi,lParam
assume edi:ptr NM_TREEVIEW
.if .hdr.code==TVN_SELCHANGED
this works fine but only for all items than
This message was edited by Allanon, on 7/2/2001 1:13:23 PMalthough ive never coded a treeview before this code should work for you.
.elseif uMsg==WM_NOTIFY
mov edi,lParam
assume edi:ptr NM_TREEVIEW
.if .hdr.code==TVN_SELCHANGED
invoke SendMessage,hTreeView,TVM_GETNEXTITEM,TVGN_CARET,NULL
.if eax == hItem0
do this
.elseif eax == hItem1
do this
.elseif eax == hItem2
do this
.endif
.endif
smurf
This message was edited by smurf, on 7/2/2001 3:14:08 PMthanx a lot smurf
ur solution worx fine with the parent item .. i only have to find out how to get a valid handle for all my subitems
Allanon download Ewayne's sample of a treeview with source included.
TabEdit
smurf
thanx again smurf but this isnīt what i need dunno if i could use it but now tried something else by my own .. prolly not very elegant but at least it worx ;)
since i have a handle for my treeview (hTree) and a handle for the parent item (hParent) i can use the macro or message GetNextItem (thanx for help there ;) )
invoke SendMessage,hTree,TVM_GETNEXTITEM,TVGN_CHILD,hParent
mov hItem1,eax
invoke SendMessage,hTree,TVM_GETNEXTITEM,TVGN_NEXT,hItem1
mov hItem2,eax
invoke SendMessage,hTree,TVM_GETNEXTITEM,TVGN_NEXT,hItem2
mov hItem3,eax
Allanon
Take a look at my Treeview2 on my site, it does not use the Shell interface or COM objects.
The program will display the directories and sub directories (up to 32 levels) of a hard drive that you select.
When you click on a folder the program will extract and display the full path.
You can also expand the tree by using a path.
Ewayne
thanx Ewayne will have a look on it
but i donīt want to display directories but nevertheless it might be helpfull :)
my treeview is only used as a part of an interface
so if i click on child item 2 do this in my listview and if i click on child 1 do that on my Edit window and so on ..
comment to ur treeview2
hm btw, wasnīt lookin at the code actually but i suppose this isnīt what u wanted ..
i canīt change the drive, it sticks always to c:\ also when i try to change the path no success still stays at c:\
tried it with NT4 and SP6 German
This message was edited by Allanon, on 7/5/2001 4:26:53 AM