源码及可执行程序下载:https://download.csdn.net/download/slionls/11300439
1.cef下载地址:http://opensource.spotify.com/cefbuilds/index.html
下载Windows 32-bit版本
2.CMake下载地址:https://cmake.org/download/
下载exe版本:Binary distributions
3.编译cef:https://blog.csdn.net/lengyue2015/article/details/77972035
4.如编译cefsimple错误,提示无法解析的外部符号等问题,查看是否下载的版本为64位版本,重新下载32位版本编译
5.cef嵌入win32程序:https://blog.csdn.net/lengyue2015/article/details/80807881
将cefsimple项目代码拷贝到自己项目中
6.CefInitialize崩溃 && Cef白屏: https://blog.csdn.net/CAir2/article/details/85006566
7.使用flash插件,可以将pepflashplayer32_32_0_0_207.dll拷贝到exe目录下,以便发布使用,注意dll使用32位版本
void TestCefAPP::OnBeforeCommandLineProcessing(const CefString & process_type, CefRefPtr<CefCommandLine> command_line)
{
//加载flash插件
command_line->AppendSwitchWithValue("--ppapi-flash-path", "pepflashplayer32_32_0_0_207.dll");
//manifest.json中的version
command_line->AppendSwitchWithValue("--ppapi-flash-version", "32.0.0.207");
//使用系统flash
//command_line->AppendSwitchWithValue("enable-system-flash", "true");
}
8.使用flash弹出黑框:https://blog.csdn.net/zhuhongshu/article/details/77482985
9.CEF 自定义用户协议(scheme)实现以二进制流的方式显示图片、视频、音频:https://www.cnblogs.com/chechen/p/10578556.html
出现跨域问题,需要添加启动参数:
command_line->AppendSwitch("--disable-web-security");
10.中文:
CefSettings settings;
CefString(&settings.locale) = "zh-CN";
CefString(&settings.accept_language_list) = "zh-CN";