将CEF3嵌入现有应用程序 [英] Embedding CEF3 with existing application

查看:336
本文介绍了将CEF3嵌入现有应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在运行的WIN32应用程序。此应用程序中有一个窗口,我想使用CEF3显示Web内容。但是,我遇到了问题,整个窗口变白了,没有显示任何网页内容。所以我有以下问题:

I have a running WIN32 application. There a window in this application where I want to show web content using CEF3. But, I am facing problems and the entire window becomes white without showing any web page content. So I have the following questions:


  1. 是否可以将CEF3与应用程序中的现有消息循环一起使用?我不想调用CEF消息循环,这可能会影响我的应用程序中的其他事情。

  2. 像示例应用程序中一样,绝对有必要使用消息窗口吗?我无法理解其目标。

  3. 当CEF3启动多个进程时,它如何在任务管理器中显示?如果我的应用程序名称是A.exe,它是否在任务管理器中多次显示A.exe?

任何帮助都非常感谢。

Any help is much appreciated.

推荐答案


  1. 对于Windows用户,可以使用多线程消息循环(CefSettings) 。允许通过自己的消息循环维护浏览器窗口。但是有一个好的做法是使用单线程消息循环-您可以在空闲或某些其他事件上定期调用CefDoMessageLoopWork。甚至可能存在现有的消息循环。

  1. For windows users there is possible to use multi threaded message loop (CefSettings). It is allow maintain browser windows via own message loop. But there is good practice use single threaded message loop, - you can call CefDoMessageLoopWork periodiacally on idle or some additional events. It is possible even with existing message loop.

我不确定您的意思。

CefSettings.BrowserSubprocessPath指定哪个可执行文件将用于子进程。当您将其集成到其他流程中时,它似乎是一个可能的解决方案,在任务管理器中,您将看到按其命名的流程。

CefSettings.BrowserSubprocessPath specifies which executable will be used for child processes. While you are integrating it in other process, looks like it is one possible solution and in task manager you will see processes as you named it.

这篇关于将CEF3嵌入现有应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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