getting browser width and height from CefBrowser object
Posted: Tue Jul 25, 2017 2:42 am
Hello,
is there an easy way of getting the browser width and height from the cefBrowser?
The thing I am trying to achieve is set the same window size for popups as the window which created it. For example my main window is 800x600 and when I click on the link - new popup shows up, but the size is not the same as of parent window. I have overridden the OnBeforePopup method in CefLifespanHandler and I need to check if the value of window being created is really the same. I would prefer to do it in CefLifespanhandler::OnAfterCreated - but it only carries the CefBrowser.
Any thoughts on this for how could I get the window width and height of windows being created?
The idea I had was to get the opener window handle by calling GetOpenerWindowHandle() on cefBrowser object of popup window. The to use this somehow and get the cefWindowInfo of the parent window. From CefWindowInfo I could get the width and height - but the question here would be - is it possible to get the windowInfo?
is there an easy way of getting the browser width and height from the cefBrowser?
The thing I am trying to achieve is set the same window size for popups as the window which created it. For example my main window is 800x600 and when I click on the link - new popup shows up, but the size is not the same as of parent window. I have overridden the OnBeforePopup method in CefLifespanHandler and I need to check if the value of window being created is really the same. I would prefer to do it in CefLifespanhandler::OnAfterCreated - but it only carries the CefBrowser.
Any thoughts on this for how could I get the window width and height of windows being created?
The idea I had was to get the opener window handle by calling GetOpenerWindowHandle() on cefBrowser object of popup window. The to use this somehow and get the cefWindowInfo of the parent window. From CefWindowInfo I could get the width and height - but the question here would be - is it possible to get the windowInfo?