开发者

Winapi: how to imitate a right button click on a specific node of a tree view control?

I'm looking for a way to send a "right mouse button pressed" message to a node of a tree view in some window. Sending message is not a problem - the problem is how do i find this control and how do i find the specific node (i know i开发者_StackOverflow社区ts displayed text)?


As I understand you are trying to emulate mouse click in foreign application and you want to search for handler to specific control to send message to it. I think you should run Spy++ or WinSpector application. They should allow you to quickly find what window and class name window have. Base on this you may use FindWindow/FindWindowEx/EnumChildWindows/GetDlgItem win32 api to get handler of it. And after that you can call PostMessage to send message to selected control. If you don't know what message you need to send you can use Spy++ or WinSpector to trace all messages that came to specified window and check what kind of them are send when you click using real mouse.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜