How to close one CefBrowserView without closing CefWindow?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Re: How to close one CefBrowserView without closing CefWindo

Postby paveldvlip » Thu Sep 08, 2022 5:23 am

I proposed a solution to the problem by calling the CloseBrowser(true) function in the DoClose function with minor changes in the function code. But I'm not sure if the code is correct. There is no other way to solve this problem.
https://bitbucket.org/chromiumembedded/ ... quests/526
paveldvlip
Techie
 
Posts: 22
Joined: Thu Mar 30, 2017 7:53 am

Re: How to close one CefBrowserView without closing CefWindo

Postby paveldvlip » Mon Nov 21, 2022 7:42 am

Found a temporary solution. I make the browser empty and invisible and it will be deleted when the window is closed.
Code: Select all
browser->GetMainFrame()->LoadURL(L"about:blank");
browser_view->SetVisible(false);
paveldvlip
Techie
 
Posts: 22
Joined: Thu Mar 30, 2017 7:53 am

Re: How to close one CefBrowserView without closing CefWindo

Postby liulun » Tue Nov 22, 2022 5:46 am

Thanks!
paveldvlip wrote:Found a temporary solution. I make the browser empty and invisible and it will be deleted when the window is closed.
Code: Select all
browser->GetMainFrame()->LoadURL(L"about:blank");
browser_view->SetVisible(false);
liulun
Techie
 
Posts: 12
Joined: Tue Sep 07, 2021 1:01 am

Re: How to close one CefBrowserView without closing CefWindo

Postby paveldvlip » Sat Feb 18, 2023 11:49 am

The same problem with the DevTools browser when using views: the browser cannot be removed until the window closes. When will this issue be resolved? Is it really that hard to change a couple of lines of source code?
paveldvlip
Techie
 
Posts: 22
Joined: Thu Mar 30, 2017 7:53 am

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 53 guests