使用FindWindow无法找到Chrome_OmniboxView [英] Cannot find Chrome_OmniboxView using FindWindow

查看:659
本文介绍了使用FindWindow无法找到Chrome_OmniboxView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到Chrome_OmniboxView窗口。我认为Chrome的名称可能会改变。以下代码不再起作用。

你能帮我吗?



I cannot find the window Chrome_OmniboxView. I think the name of Chrome maybe change. The code as following cannot work anymore.
Could you please help me?

hwndChromeMain = FindMainWebBroswer(L"Chrome_WidgetWin_1"); // OK
// get buffer
::SendMessage(hwndChromeMain, WM_GETTEXT, 255, (LPARAM)buffer);  // OK        
// saved buffer
// find chrome child tab
hwndChromeChild = ::FindWindowExW(hwndChromeMain, NULL, L"Chrome_OmniboxView", NULL); // NOT OK



hwndChromeChild是总是NULL。


The hwndChromeChild is always NULL.

推荐答案

如果你想为Chrome写一个扩展名,请使用官方 Chrome扩展程序API 可获得最佳效果。并查看 Omnibox API 。因为有很多非法使用,浏览器经常会改变一些安全解决方案,所以有些黑客不会永远工作。
if you want to write an extension for Chrome use the official Chrome extension API for best results. And take a look at the Omnibox API. Because there is a lot of illegal use the browsers often change some security solution and so some hacks wont work forever.


这篇关于使用FindWindow无法找到Chrome_OmniboxView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆