简体   繁体   English

获取活动的Windows资源管理器URL

[英]Get active windows explorer URL

I want to write a program to identify the URL of active explorer window with C++. 我想编写一个程序来识别使用C ++的活动资源管理器窗口的URL。 But everything I could find were the way of finding URLs of all explorers and finding the contex of active window. 但是我所能找到的就是找到所有浏览器的URL并找到活动窗口的顶点的方法。 Could you please help me? 请你帮助我好吗?

Getting contex of active window: 获取活动窗口的顶点:

HWND handle = GetForegroundWindow();

Getting URL of all explorers: 获取所有浏览器的URL:

http://www.codeproject.com/Questions/279108/Get-URL-Of-Current-Web-Page http://www.codeproject.com/Questions/279108/Get-URL-Of-Current-Web-Page

You should get explorer contex by applying get_HWND on your IWebBrowser2 for each explorer. 您应该通过在IWebBrowser2为每个资源管理器应用get_HWND来获取资源管理器get_HWND Then compare them with active window contex to find the active explorer window and its URL. 然后将它们与活动窗口上下文进行比较,以找到活动资源管理器窗口及其URL。

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

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