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.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Application startup Cef4Delphi

Post Reply
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Application startup Cef4Delphi

Post 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.
Post Reply