NIM_Duilib_Framework icon indicating copy to clipboard operation
NIM_Duilib_Framework copied to clipboard

为什么 GetCefHandle() 获得的句柄 与SPY++获得的CEF真屏窗口句柄不一样呢

Open shuilan0066 opened this issue 4 years ago • 3 comments

想做CEF窗口子类化,截取鼠标进入进出消息 但是发现

HWND CefControlBase::GetCefHandle() const { if (browser_handler_.get() && browser_handler_->GetBrowserHost().get()) return browser_handler_->GetBrowserHost()->GetWindowHandle();

return NULL;

} 这种方式获得的句柄 和SPY++得到的句柄不一样

请问,为什么不一样呢 如何获得正确的CEF真屏窗口句柄呢

shuilan0066 avatar Jun 01 '20 02:06 shuilan0066

image

找到原因了 GetCefHandle 得到的是 CefBrowserWindow的句柄 但CefBrowserWindow 下面的两个子窗口 该如何理解 代表的是什么呢 子类化最下面的 才可以截取到鼠标移动消息

shuilan0066 avatar Jun 01 '20 05:06 shuilan0066

image

shuilan0066 avatar Jun 01 '20 05:06 shuilan0066

截取到了 鼠标移动消息 但是还是无法据此判断 鼠标是否进入还是离开浏览器

shuilan0066 avatar Jun 02 '20 01:06 shuilan0066