CreateBrowser actually asynchronous?

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.

CreateBrowser actually asynchronous?

Postby perrstep » Sat Jan 08, 2011 12:18 am

Hi,

Given this code in the OnInitDialog of the browser's parent window:
CefBrowser::CreateBrowser(info, false, static_cast<CefRefPtr<CefHandler>>(m_handler), L"");
m_handler->GetBrowser()->GetMainFrame( )->LoadURL(L"http://www.somewhere.com");

This fails because GetBrowser() returns NULL. Surprised me. How can I synchronize on the actual completion of the browser creation.

MFC / Win32 / Vista / CEF configured to use the app's message pump.


Thanks for any insights.

Stéphane Perras
perrstep
Techie
 
Posts: 25
Joined: Thu Nov 18, 2010 6:02 pm

Re: CreateBrowser actually asynchronous?

Postby magreenblatt » Sun Jan 09, 2011 7:22 pm

How can I synchronize on the actual completion of the browser creation.

Use CreateBrowserSync. See the associated header file comments for details.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 44 guests