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.

Update to CEF 3.3538.1852.gcb937fc

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

Update to CEF 3.3538.1852.gcb937fc

Post by salvadordf »

Hi,

I just uploaded a new version of CEF4Delphi and this is what's new :
  • Update to CEF 3.3538.1852.gcb937fc.
  • The issue #139 has been fixed. Read the comments in GitHub for more details. If you have any issue, you can disable this fix by setting the new GlobalCEFApp.DestroyAppWindows property to FALSE. https://github.com/salvadordf/CEF4Delphi/issues/139
  • Added a LoadHandler in the render process. Now you can use the GlobalCEFApp.OnLoadingStateChange, GlobalCEFApp.OnLoadStart, GlobalCEFApp.OnLoadEnd and GlobalCEFApp.OnLoadError events in the render process.
  • Fixed a Delphi XE2 compilation issue.
The CEF3 binaries are :
User avatar
xpert13
Posts: 39
Joined: Wed May 31, 2017 5:26 pm

Re: Update to CEF 3.3538.1852.gcb937fc

Post by xpert13 »

Hello, salvadordf.

The fix of issue #139 doesn't work when I try to use External Message Pump. Even if I just create a TCEFWorkScheduler object it's broke Excel starting speed.

For my application very important to use External Message Pump. Is there any way to fix bug and use single EXE file?

P.S. ExternalPumpBrowser demo has same problem.
Last edited by xpert13 on Sun Nov 18, 2018 1:17 pm, edited 1 time in total.
User avatar
xpert13
Posts: 39
Joined: Wed May 31, 2017 5:26 pm

Re: Update to CEF 3.3538.1852.gcb937fc

Post by xpert13 »

I tried to execute SubProcess example and it doesn't help. Excel is starting to slow.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Update to CEF 3.3538.1852.gcb937fc

Post by salvadordf »

Thanks for reporting this xpert13 !
I'll take a look as soon as I can.
User avatar
xpert13
Posts: 39
Joined: Wed May 31, 2017 5:26 pm

Re: Update to CEF 3.3538.1852.gcb937fc

Post by xpert13 »

I found a reason - AllocateHWnd in TCEFWorkScheduler.AfterConstruction

When I comment this line

Code: Select all

FCompHandle      := AllocateHWnd(WndProc);
Excel works fine.

And I don't know why, but Chromium works fine too. As I can see this window created for CEF_PUMPHAVEWORK message but even if it doesn't exist somehow application works.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Update to CEF 3.3538.1852.gcb937fc

Post by salvadordf »

Thanks again! :D

TCEFWorkScheduler calls AllocateHWnd to receive the CEF_PUMPHAVEWORK message and schedule the calls to DoMessageLoopWork. Commenting the AllocateHWnd line will degrade the browser performance.

I'll try to modify WndProc to reply correctly to the WM_DDE_INITIATE message Excel sends... as soon as I have time... :oops:
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Update to CEF 3.3538.1852.gcb937fc

Post by salvadordf »

...now that I think of it... perhaps the solution is not creating TCEFWorkScheduler when GlobalCEFApp.ProcessType isn't ptBrowser.
User avatar
xpert13
Posts: 39
Joined: Wed May 31, 2017 5:26 pm

Re: Update to CEF 3.3538.1852.gcb937fc

Post by xpert13 »

salvadordf wrote: Mon Nov 19, 2018 6:27 pm ...now that I think of it... perhaps the solution is not creating TCEFWorkScheduler when GlobalCEFApp.ProcessType isn't ptBrowser.
It did not help. I have already tried this option. In this case WndProc didn't receive WM_DDE_INITIATE but Excel still runs slowly.
User avatar
xpert13
Posts: 39
Joined: Wed May 31, 2017 5:26 pm

Re: Update to CEF 3.3538.1852.gcb937fc

Post by xpert13 »

perhaps the solution is not creating TCEFWorkScheduler when GlobalCEFApp.ProcessType isn't ptBrowser.
I am sorry, I made a mistake. Your solution is right. It fix the issue with Excel.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Update to CEF 3.3538.1852.gcb937fc

Post by salvadordf »

I uploaded the fix for this issue.

Please, download CEF4Delphi again and try the external message pump demos as they are with excel.
Post Reply