Page 1 of 1

Re: Resize not working

Posted: Tue Feb 13, 2018 7:06 pm
by salvadordf
The browser needs to know when the parent component has been resized to resize the contents.

The TCEFWindowParent does that overriding the Resize procedure.

You can use a handle from another process to be the browser parent but you will miss several browser functions.

Re: Resize not working

Posted: Wed Feb 14, 2018 8:22 am
by salvadordf
I haven't tried that on a different process but I guess you can try to use a similar method to the one used in TCEFWindowParent.UpdateSize.

Call TChromium.WindowHandle to get the browser handle and then use BeginDeferWindowPos, DeferWindowPos and EndDeferWindowPos.

TCEFWindowParent uses GetWindow(Handle, GW_CHILD) instead of TChromium.WindowHandle. Try both if necessary.

This is source for TCEFWindowParent :
https://github.com/salvadordf/CEF4Delph ... Parent.pas