Re: TreeView events
- Posted by euman at bellsouth.net Dec 11, 2001
- 541 views
Hello Tyler, Here is a snippet from one of my projects! iMsg = peek4s(lParam + NMHDR_code) if iMsg = TVN_ITEMEXPANDING then hItem = peek4u(lParam + NMTVHDR_itemNew) if peek4s(lParam + NMTVHDR_action) = TVE_EXPAND then With the (above), if you get to this point then your TreeView Item is expanding. Good luck on your Treeview journey, it took me almost a month to get a directory listing treeview similar to (BrowseforFolders) written without shell commands that is compatible with Win 95,98,2k,NT and XP. I dont release stuff like this cause in testing the waters with the user-contrib page I dont fair well with smiley-faces. I'll help if you have any further question though. Hint for you, keep an eye on the Comctl32.dll version tables in the MS-SDK. Most of the functionalilty you'll require will have to be written for version 4.71+ Euman euman at bellsouth.net From: "Tyler Southwick" <wick900 at operamail.com> > I have a treeview that i need to capture the expanding of a treeview > child. I have it set up to capture the expanding, but I don't know how > I can figure out which of the treeview items caused the expanding. > 'hitTestTV' does not work if the plus box is clicked next to the item > > <code> > procedure myNotify(atom iMsg, atom wParam, atom lParam) > atom lNewMsg, tvId, VOID > integer id > sequence dirData, currDir > -- Only look at NOTIFY messages > if iMsg = WM_NOTIFY then > -- Get which notify message it is. > lNewMsg = fetch( lParam, NMHDR_code ) > -- Get which control sent it. > id = getId( fetch(lParam, NMHDR_hwndFrom ) ) > --use the ID in any way > end if > end procedure > </code> > > > >