February 6th, 2014, 01:42 AM
Unable to click on treeview child item programatically Win32/C/C++
My question is simple - "In application with lots of data, I am unable to click on the treeview child item". Kindly read detail explanation:
I am creating a function to simulate a treeview control in another process. So far I have succeded in
1.Getting handle of Tree view control handle of another process using Hooking technique.
2.Getting handle of root and other item of treeview.
For Eg: Now I need to click on an child2 (Parent1->child1->child2).I checked in small sample application it worked well.Next I started to test using real application , in that application when parent1 is clicked only "Dummy items" appear. I know for performance, when treeview control is loaded for the first time Parent1 will contain "Dummyitems". After clicking/Expanding on parent1 it will fetch the data from DB and display its contents. But for me when I click the parent item programatically it only displays "dummyitems" for the first time,So I am unable to click on other items. Kindly help.
February 28th, 2014, 10:15 AM
Re: Unable to click on treeview child item programatically Win32/C/C++
I'm not sure what you mean by "simulate" a treeview control, but from your description it sounds like you are trying to ACCESS an existing control from Is it possible that you inadvertently have created a new tree object, and you are talking (clicking) on it instead?
I'd start by proving to yourself that you are talking to the same object. Each tree node , I believe' has a user defined numeric you can read an write to. Try reading and writing to that tree bode's numeric structure member, searching for it by both ID and handle from both the primary and second applications while their both running, and make sure you've added some test code to the primary tree so you'll know for sure when it is being called, and the data associated with that node is changing. Uf it never does, then either you're talking to a different instance of the tree. If that is not the case, maybe there is a security issue between the processes stopping the first one from accessing your database, when you're hooked into it. If that turns out to be the case, at least you'll have an idea whether the problem is at the simulator side, the primary app side, or is a windows issue, like security.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.