简体   繁体   English

如何在另一个窗口中获取组合框的HWND?

[英]How to get the HWND of a Combobox in another window?

How can I get the HWND of the Combobox using C++ in another third party application? 如何在另一个第三方应用程序中使用C ++获取组合框的HWND?

MSDN has a function called GetDlgItem() but the 2nd parameter requires the ID of the control. MSDN有一个名为GetDlgItem()的函数,但是第二个参数需要控件的ID。 There is the function GetDlgCtrlID() to get that control ID but that requires the HWND of the Combobox. 有函数GetDlgCtrlID()来获取该控件ID,但这需要组合框的HWND。

Would I have to use UIspy or Spy++ to retrieve information to accomplish this? 我是否必须使用UIspy或Spy ++来检索信息以完成此任务?

Yes use a spy tool to get the control ID. 是的,请使用间谍工具获取控件ID。 GetDlgItem also requires the HWND of the control's parent dialog. GetDlgItem还需要控件的父对话框的HWND。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM