Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
treeview
Posted: Tue Aug 14, 2007 05:32 PM
Otto,
When an item is inserted into a treeview a TV_INSERTSTRUCT struct is used (please review source\winapi\treeview.c).
The TV_INSERTSTRUCT contains a TV_ITEM structure and there you have a member, named lParam where you can store a 32 bits number. Similar like Clipper "cargo".
So you have to modify source\winapi\treeview.c and add this line:
is.item.lParam = _parnl( 5 );
Then modify the Class TTreeView to accept an extra parameter:
METHOD Add( cPrompt, nImage, nValue ) CLASS TTreeView
...
oItem := TTVItem():New( TVInsertItem( ::hWnd, cPrompt,, nImage, nValue ), Self )