对win64使用cef-如何启用全屏



我正在使用CEF,并且已经构建了cefsimple.exe。我可以在simple_app.cpp中包含任何html文件,该文件将在双击后启动。但是如何在全屏模式下启动这个cefsimple.exe呢?我需要哪种版本?我在win64系统上使用VS2013。

SimpleApp::SimpleApp() {
}
void SimpleApp::OnContextInitialized() {
CEF_REQUIRE_UI_THREAD();
// Information used when creating the native window.
CefWindowInfo window_info;

 #if defined(OS_WIN)
  // On Windows we need to specify certain flags that will be passed to
  // CreateWindowEx().
  window_info.SetAsPopup(NULL, "cefsimple");
// my first try: *************************************
 /* RECT winrect;
  winrect.bottom = 0;
  winrect.left = 0;
  winrect.right = 0;
  winrect.top = 0;
  window_info.SetAsChild(NULL, winrect);*/
#endif
  // SimpleHandler implements browser-level callbacks.
  CefRefPtr<SimpleHandler> handler(new SimpleHandler());
  // Specify CEF browser settings here.
  CefBrowserSettings browser_settings;
  
  std::string url;
  // Check if a "--url=" value was provided via the command-line. If so, use
  // that instead of the default URL.
  CefRefPtr<CefCommandLine> command_line =
      CefCommandLine::GetGlobalCommandLine();
  url = command_line->GetSwitchValue("url");
  if (url.empty())
    url = "file:///C:/Projekte/BOF-WENDT-HTML5/Fullscreen.html";
  // Create the first browser window.
  CefBrowserHost::CreateBrowser(window_info, handler.get(), url,
                                browser_settings, NULL);
}

尚未在CEF中实现,请参阅:https://code.google.com/p/chromiumembedded/issues/detail?id=562

更新:此功能的更改已落地https://bitbucket.org/chromiumembedded/cef/issue/562

相关内容

  • 没有找到相关文章

最新更新