Page 1 of 1

Re: Application startup Cef4Delphi

Posted: Thu Dec 07, 2017 8:05 am
by salvadordf
Hi,
thekewinn wrote: Thu Dec 07, 2017 1:49 am I was examining the demos and i found that every one has the GlobalCEFApp := TCefApplication.Create;...f GlobalCEFApp.StartMainProcess then code.
Yes. CEF4Delphi needs that code before initializing the application. You can read more about that here :
https://www.briskbard.com/index.php?lang=en&pageid=cef
thekewinn wrote: Thu Dec 07, 2017 1:49 am Im interested in use CEF in one application, but I don't wanna load Cef at start. I am using dinammicaly loaded packages (BPL), and not always im openning chromium.
So my questions are:
Do i really need to load cef at application startup? If so, there's another alternative?
The GlobalCEFApp creation and the GlobalCEFApp.StartMainProcess call at the DPR file only loads the DLLs and initializes CEF. The browser (TChromium) can be created later or not created at all if the user don't need it.

I guess you could try to configure GlobalCEFApp to use a different EXE for the subprocesses and create GlobalCEFApp only if it's needed but that's an unsupported scenario.