C# 在任何窗口上查找选定的控件

发布于 2024-08-24 17:42:20 字数 82 浏览 4 评论 0原文

在任何窗口上查找活动控件的最佳方法是什么?我将向它发送 WM_PASTE 消息。 ChildWindowFromPoint 尚未返回相当多的选定控件。

What would be the best way to go about finding what the active control is on any window? I am going to be sending the WM_PASTE message to it. ChildWindowFromPoint has not been returning a fair few of the selected controls.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

各空 2024-08-31 17:42:20

啊,是的。 WM_Paste ....

Winform应用程序?

为什么你认为活动窗口可以接收它们?我的意思是,除非它是一个 ActiveX 控件......它不会有自己的较低级别的消息泵。它会对 .NET 框架内传播的事件做出反应...只有活动 x(本机)控制窗口 IIRC 处理窗口消息。

Ah, yeah. WM_Paste....

Winform application?

Why do you assume that the active window can receive them? I mean, unless it is an activeX control.... it would not ahve it's own lower level message pump. It would react on events propagated within the .NET framework... only active x (native) controls an dthe window IIRC handle windows messages.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文