How to maximize window content

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.

How to maximize window content

Postby cdiscla » Wed Sep 24, 2014 4:41 pm

Hello
i have embedded my web app in the cefclient app and it runs fine in Windows.
The problem is that when i click the maximize button, the window is maximized, but the content inside the windows remains of the same size. What do i have to do to maximize the embedded browser window?

Thanks in advance
cris
cdiscla
Newbie
 
Posts: 5
Joined: Thu May 15, 2014 3:42 am

Re: How to maximize window content

Postby magreenblatt » Wed Sep 24, 2014 6:34 pm

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

Re: How to maximize window content

Postby cdiscla » Mon Oct 06, 2014 7:12 am

I am on Win8, CEF 3.1650 and i get a similar result: Image

I would like to resize browser window ... how can i resize browser window to be the same as container window?

Thanks in advance !
c.
cdiscla
Newbie
 
Posts: 5
Joined: Thu May 15, 2014 3:42 am

Re: How to maximize window content

Postby magreenblatt » Mon Oct 06, 2014 11:49 am

you need to handle WM_SIZE with a wParam value of SIZE_MAXIMIZED, and then resize the CEF window to match the new client area size. See here for WM_SIZE usage.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: How to maximize window content

Postby tiplip » Mon Oct 19, 2015 12:36 am

hi, I have such issue, and I don't know how to handle size after many tries. is there any example snippet?
tiplip
Mentor
 
Posts: 77
Joined: Thu Mar 26, 2015 3:09 am

Re: How to maximize window content

Postby MartinM » Mon Oct 19, 2015 3:12 am

Did you take a look at the cefclient sample application? In cef / tests / cefclient / browser / root_window_win.cc you can see how WM_SIZE is handled.

I'd recommend, that you base your application off the cefsimple sample application.
MartinM
Techie
 
Posts: 25
Joined: Wed Nov 07, 2012 5:21 am

Re: How to maximize window content

Postby tiplip » Mon Oct 19, 2015 3:29 am

MartinM wrote:Did you take a look at the cefclient sample application? In cef / tests / cefclient / browser / root_window_win.cc you can see how WM_SIZE is handled.

I'd recommend, that you base your application off the cefsimple sample application.


Hi, this issue can be reproduced by modifying one line code of cefclient demo, that is:

change in RootWindowWin::CreateRootWindow of root_window_win.cc

Code: Select all
Show(ShowNormal);


to

Code: Select all
Show(ShowMaximized);
tiplip
Mentor
 
Posts: 77
Joined: Thu Mar 26, 2015 3:09 am

Re: How to maximize window content

Postby magreenblatt » Mon Oct 19, 2015 9:41 am

tiplip wrote:Hi, this issue can be reproduced by modifying one line code of cefclient demo

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

Re: How to maximize window content

Postby tiplip » Mon Oct 19, 2015 8:34 pm

magreenblatt wrote:
tiplip wrote:Hi, this issue can be reproduced by modifying one line code of cefclient demo

What OS and CEF version are you using?


latest version, win32, infact each win32 version can show this sign
tiplip
Mentor
 
Posts: 77
Joined: Thu Mar 26, 2015 3:09 am

Re: How to maximize window content

Postby magreenblatt » Mon Oct 19, 2015 9:18 pm

Please file a bug.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 105 guests