Winforms Control Stealing WndProc WM_NCHITEST

a 夏天 提交于 2019-12-06 14:46:53

There are 2 complications running Chromium Embedded Web Browser firstly it creates its own window and attaches as a child to yours which means you need to intercept the WndProc of the child window. Secondly CefSharp runs with multi_threaded_message_loop=true which actually fires up a new thread to process messages for the browser which means you need to be a little careful going back and forth from your UI thread and its one.

The solution involves liberal use of PInvoke so I have made a gist for it.

Method to watch a child window messages specifically for use with CefSharp Chromium Embedded Web Browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!