Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 API FindwindowEx 在 Putty 文本框中输入 IP 地址。我知道文本框窗口被称为“编辑”,问题是腻子父窗口中有三个“编辑”窗口。
有没有办法将三个“编辑”子窗口分开,所以我只向一个发送文本?
不要认为您可以指定任何内容FindWindowEx来区分不同的编辑子窗口。您可以调用GetWindowsRect每个子窗口的句柄并找到位于窗体左上角的那个。您也可以调用GetWindowLength- 这将很容易删除端口编辑框(因为它比表单上的其他两个短)。
FindWindowEx
GetWindowsRect
GetWindowLength
当我遍历子窗口时,IP 地址编辑框总是首先出现。不确定您是否可以保证。