无法以编程方式Win32 / C / C ++单击treeview子项 [英] unable to click on the treeview child item programatically Win32/C/C++

查看:123
本文介绍了无法以编程方式Win32 / C / C ++单击treeview子项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题很简单 - 在包含大量数据的应用程序中,我无法单击treeview子项。请仔细阅读详细说明:



我正在创建一个函数来模拟另一个进程中的树视图控件。到目前为止我已经成功了

1.使用挂钩技术获取另一个进程的Tree视图控件句柄。

2.获取root和其他treeview项的句柄。



例如:现在我需要点击一个child2(Parent1-> child1-> child2)。我在小样本应用程序中检查它运行良好。下一步我开始使用真实应用程序进行测试,在单击parent1时该应用程序中只显示Dummy items。我知道性能,当第一次加载树视图控件时,Parent1将包含Dummyitems。在parent1上单击/扩展后,它将从DB获取数据并显示其内容。但对我来说,当我以编程方式单击父项时,它首次只显示dummyitems,所以我无法点击其他项目。请帮助。

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.

推荐答案

您是否首先在子项上执行了一次klick,或者您是否首先以编程方式展开父项?



也许你试图点击子项并且他的父项不是expanddet,所以项目没有从DB加载,因此只有虚拟项目。



检查父项是否展开,然后点击你想要的项目。
did you perform first a klick on a child item or did your first expand the parent items programatically?

Maybe you try to klick on a child item and his parent isn't expandet, so the item's are not loaded from the DB, so there are only the dummy items.

Check if the Parent Items are expanded and then klick the item you want.


你究竟是什么意思你使用了钩子技术...这是一个非常没有具体的术语?



你是在谈论继承或超类化列表框还是你真的走出了常规轨道并使用了Windows挂钩?



这里解释了这些术语:

http:/ /winapi.foosyerdoos.org.uk/info/sub_superclass.php [ ^ ]



关于你在做什么并没有什么复杂的事情我不能为我的生活找出你插入的原因任何东西都挂钩。
What exactly do you mean you used a hooking technique ... that is a very no specific term?

Are you talking about subclassing or superclassing the Listbox or have you really gone off the beaten track and used windows hooks?

Here this explains the terms:
http://winapi.foosyerdoos.org.uk/info/sub_superclass.php[^]

There is nothing complicated about what you are doing and I can't for the life of me work out why you are inserting hooks in anything.


这篇关于无法以编程方式Win32 / C / C ++单击treeview子项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆