I´ve been working with CEF3 for Windows, to replace an old application based on IE. Untill this point, CEF is working great to our purposes, and I´m really impressed with his resources
Here is the situation I have:
1 - There´s a transparent window created to be the parent window handle for CefBrowserHost::CreateBrowser;
2 - I have an HTML page with full transparent BG and a circle shaped div with my div´s content (my goal is to create a rounded window with CEF browser inside);
3- The backgorund of the browser is white, and I need to change to full transparent.
Here is my code (modified from cefclient application):
- Code: Select all
g_handler = new ClientHandler();
g_handler->SetMainHwnd(hWnd);
RECT rect;
int x = 0;
GetClientRect(hWnd, &rect);
rect.top += 0;
CefWindowInfo info;
CefBrowserSettings settings;
rect.top = topvalue;
rect.bottom = bottomvalue;
rect.left = leftvalue;
rect.right = rightvalue;
info.SetTransparentPainting(TRUE);
info.SetAsChild(hWnd, rect);
CefString newURL = "http://localhost/console/teste.html";
CefBrowserHost::CreateBrowser(info,static_cast<CefRefPtr<CefClient> >(g_handler),newURL, settings);