Hi,
I compiled the 1750 release from the source manually on windows 7.
When I run cefsimple or cefclient , both crashed.
The debug.txt file has this error saying that a top-level window cannot be a child window.
chrome.exe works fine.
I traced to the error to ChromiumRelease/src/ui/gfx/win/window_impl.cc (see below)
It seems parent == HWND_DESKTOP is true and yet WS_CHILD flag is set
which causes the CHECK((window_style_ & WS_CHILD) == 0) to fail.
When I forced the removal of WS_CHILD via window_style_ &= ~WS_CHILD and set
parent to GetDesktopWindow, the executables ran but of course the browser window is displaced,
out of the main window. Resizing the main window affects the browser window as well, implying
the browser window is a child.
What am I doing wrong? Could it be Aura related or some build flags ?
void WindowImpl::Init(HWND parent, const Rect& bounds) {
if (window_style_ == 0)
window_style_ = parent ? kWindowDefaultChildStyle : kWindowDefaultStyle;
if (parent == HWND_DESKTOP) {
// Only non-child windows can have HWND_DESKTOP (0) as their parent.
CHECK((window_style_ & WS_CHILD) == 0);
parent = GetWindowToParentTo(false);
} else if (parent == ::GetDesktopWindow()) {
// Any type of window can have the "Desktop Window" as their parent.
parent = GetWindowToParentTo(true);
} else if (parent != HWND_MESSAGE) {
CHECK(::IsWindow(parent));
}
.........................
}
Thanks and kind regards,
Eugene