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.
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Resize not working
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Resize not working
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
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