>George and Victor,
>
>I've discovered a way to produce the problem pretty consistently, also with TreeView and ImageList. The technique is pretty straightforward.
>
>Drop a non-subclassed Treeview and non-sub'd Imagelist on a form. In the TreeView init, link it to the imagelist and code up a few items on the Treeview.
>
>Then put a button on the form that "walks" the tree and prints the text of each item to the screen. Since this requires a recursive routine, create a form method to do it.
>
>I get the C000005 when I click the button the second time. I "works" every time for me. My theory is that there is some flaw in the creation of local pointers to treeview nodes. I don't have much to go on except that very often my forms will not unload after I've run code like that below. I've triple checked my code and there are absolutely no dangling pointers to the form or to form objects.
>
>Trouble is, I have no idea whom to tell at Microsoft.
>
>My recursive tree walking routine looks like this:
>
>LPARAM loNode
>acti screen
>? LoNode.Text
>IF loNode.Children > 0
> Thisform.FormWalkTheTree(loNode.Child)
>ENDIF
>DO WHILE TYPE("loNode.Next.Key") = "C"
> loNode = loNode.Next
> acti screen
> ? LoNode.Text
> IF loNode.Children > 0
> thisform.FormWalkTheTree(loNode.Child)
> ENDIF
>ENDDO
Thanks for your report. I will try to repro here.
Randy [msft]
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only