1、最后一个支持win7的cef
版本:cef_binary_109.1.18+gf1c41e4+chromium-109.0.5414.120_windows32.tar.bz2
2、设置全屏
修改cef_binary_109.1.18+gf1c41e4+chromium-109.0.5414.120_windows32\tests\cefclient\browser\root_window_views.h
的2个变量 initial_bounds_ 和 initial_show_state_ 的初始值
修改为:
CefRect initial_bounds_ = CefRect(0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
cef_show_state_t initial_show_state_ = CEF_SHOW_STATE_FULLSCREEN;
修改cef_binary_109.1.18+gf1c41e4+chromium-109.0.5414.120_windows32\tests\cefclient\browser\root_window.h
的3个变量初始值
修改为:
CefRect bounds = CefRect(0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
CefRect source_bounds = CefRect(0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
cef_show_state_t show_state = CEF_SHOW_STATE_FULLSCREEN;
在文件cef_binary_109.1.18+gf1c41e4+chromium-109.0.5414.120_windows32\tests\cefclient\cefclient_win.cc
的这行代码
command_line->InitFromString(::GetCommandLineW());
后增加
command_line->AppendSwitch(switches::kUseViews);
3、修改首页地址
在下面这个代码前
context->GetRootWindowManager()->CreateRootWindow(std::move(window_config));
增加
window_config->url = "https://www.baidu.com";
4、隐藏工具栏
command_line->AppendSwitch(switches::kHideControls);