Martin Stottmeister
Martin Stottmeister

Reputation: 31

Using cef for win64 - How to enable fullscreen

I'm using CEF and have built the cefsimple.exe. I can include any html file to the simple_app.cpp which will start after the doubleclick. But how is it possible to start this cefsimple.exe in fullscreen mode? Which build do I need? I work with VS2013 on a win64 system.

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);
}

Upvotes: -1

Views: 3796

Answers (1)

Czarek Tomczak
Czarek Tomczak

Reputation: 20645

Not yet implemented in CEF, see: https://code.google.com/p/chromiumembedded/issues/detail?id=562

Update: Changes for this feature have landed https://bitbucket.org/chromiumembedded/cef/issue/562

Upvotes: 0

Related Questions