CEF Latest build borderless window

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.

CEF Latest build borderless window

Postby otoshimono » Wed Nov 18, 2015 4:16 am

Hello!

I am new to CEF and I have just gotten the latest branch up and running.
I am working with cefsimple for now. I was looking for a way to request a borderless window, but I couldn't find any.

Any pointers?

Best regards
otoshimono
Techie
 
Posts: 14
Joined: Wed Nov 18, 2015 4:14 am

Re: CEF Latest build borderless window

Postby magreenblatt » Wed Nov 18, 2015 11:14 am

What OS and CEF version?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF Latest build borderless window

Postby otoshimono » Wed Nov 18, 2015 11:31 am

Latest branch among the builds for CEF3 and windows 7x64 (build is x32)
otoshimono
Techie
 
Posts: 14
Joined: Wed Nov 18, 2015 4:14 am

Re: CEF Latest build borderless window

Postby magreenblatt » Wed Nov 18, 2015 12:17 pm

You can create a borderless window by setting attributes of the CefWindowInfo structure (specifically, specify WS_BORDER for the style).
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF Latest build borderless window

Postby otoshimono » Thu Nov 19, 2015 11:49 pm

Thank you for the help.

For testing purposes I tried setting window_info.ex_style = {some defined style} (WS_ from definition list) in simple_app.cc before the CreateBrowser call where window info is relayed.
However, the debug breaks at line 291 in libcef_dll_wrapper.cc with no error message.
I was not able to run border-less window mode due to this.
otoshimono
Techie
 
Posts: 14
Joined: Wed Nov 18, 2015 4:14 am

Re: CEF Latest build borderless window

Postby magreenblatt » Fri Nov 20, 2015 10:13 am

The CefWindowInfo arguments will be passed to CreateWindowEx. See the documentation: https://msdn.microsoft.com/en-us/library/windows/desktop/ms632680(v=vs.85).aspx

Specifically, the WS_BORDER value would be set for |style| not |ex_style|.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF Latest build borderless window

Postby otoshimono » Wed Nov 25, 2015 3:16 am

Thanks again for the help.

I tried putting a standard style even with borders to test if I could customize it
like so window_info.style = WS_BORDER | WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE;
Even with this I get the same exception break as before.
The rest of the source code is untouched and CEF3 was a clean install.

I am setting window style in simple_app.cc before the CefBrowserHost::CreateBrowser() call.

Not sure why it is breaking? No error message.

If I refrain from setting window_info.style, then the program compiles and runs as expected.
otoshimono
Techie
 
Posts: 14
Joined: Wed Nov 18, 2015 4:14 am

Re: CEF Latest build borderless window

Postby magreenblatt » Wed Nov 25, 2015 12:26 pm

otoshimono wrote:window_info.style = WS_BORDER | WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE;

Do not set WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS for a top-level window.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF Latest build borderless window

Postby otoshimono » Fri Nov 27, 2015 12:08 am

Thank you again. I made progress, but the window won't show.

I have tried setting simply window_info.style = WS_VISIBLE or window_info.style = WS_POPUP, and other combinations.
with only WS_VISIBLE, the window shows, but still with borders, although no buttons or menu.
With other combinations the window is created, but it does not show (however it appears on the taskbar and if I hover the mouse over that icon, I can see its siluette).

What exactly is missing?

I am also setting the window position after the style.


Edit: I resolved the issue.

The combination of WS_POPUP | WS_VISIBLE | WS_SYSMENU did the trick for me.
Now I will have to implement my own method of moving and closing the window.
Thanks for the support, again. :)
otoshimono
Techie
 
Posts: 14
Joined: Wed Nov 18, 2015 4:14 am

Re: CEF Latest build borderless window

Postby kavadog » Sun Mar 26, 2017 1:57 pm

How is a borderless window requested on OSX/MAC?
kavadog
Techie
 
Posts: 28
Joined: Mon Jul 27, 2015 5:46 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 101 guests