I am having a trouble with showing main window just after CEF has finished loading url. I am creating a main window, and calling ShowWindow(SW_HIDE) on it. Later, in CefLoadHandler::OnLoadEnd() method, I am sending an event to notify main window, that loading page has finished, and it's ready to "appear" for user. Here is a code (it's MFC project):
- Code: Select all
void CMainWindow::handlePageLoaded(...)
{
ShowWindow(SW_SHOW);
UpdateWindow();
}
As soon as "UpdateWindow();" is reached, the main window is either loaded with blank white page, or with loaded page. It's completely random. Does anyone have any idea, what might cause this problem? It's worth to mention, that CEF window is wrapped into standalone control (it inherits from CWnd), and CMainWindow has this control as a member.
Regards,
szulak