Enable embedded cef fullscreen

来源:互联网 发布:linux man 退出 编辑:程序博客网 时间:2024/06/05 07:47

I program cefsimple project as demo.


Solution 1:

fix in void SimpleApp::OnContextInitialized() 


RECT desktop;const HWND hDesktop = GetDesktopWindow();GetWindowRect(hDesktop, &desktop);window_info.SetAsChild(hDesktop, desktop);


Solution 2:

fix in  void SimpleHandler::OnAfterCreated(CefRefPtr<CefBrowser> browser) 


  //RECT desktop;  //const HWND hDesktop = GetDesktopWindow();  //GetWindowRect(hDesktop, &desktop);   //int horizontal = desktop.right;  //int vertical = desktop.bottom;  //HWND browserhwnd = (HWND)browser->GetHost()->GetWindowHandle();  //SetWindowLongPtr(browserhwnd, GWL_STYLE, WS_SYSMENU | WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE);  //MoveWindow(browserhwnd, 0, 0, horizontal, vertical, TRUE);


原创粉丝点击