Page 2 of 2

Re: SendMouseWheelEvent does not work

Posted: Tue Feb 25, 2020 10:31 am
by salvadordf
The PopupBrowser demo shows how to avoid the "System Error Code 5" problem when the browser needs to show a new popup window in OSR mode.

It creates a hidden form that is used in the TChromium.OnBeforePopup event but in your case you should create a hidden tab.

Re: SendMouseWheelEvent does not work

Posted: Tue Feb 25, 2020 10:34 am
by salvadordf
There's a CEF issue with the TChromium.OnBeforePopup event and new popup windows in OSR mode :
https://github.com/salvadordf/CEF4Delphi/issues/249
https://bitbucket.org/chromiumembedded/ ... n-osr-mode

Re: SendMouseWheelEvent does not work

Posted: Wed Feb 26, 2020 2:37 am
by micmorozov
My situation is simpler:
I do not create tabs from TChromium.OnBeforePopup event.
I create them as in TabbedBrowser2, only every frame has an OSR browser.
Which is also created dynamically with different context

Re: SendMouseWheelEvent does not work

Posted: Wed Feb 26, 2020 7:36 am
by salvadordf
Then the solution is much easier.

Check all TChromium events to see if if any VCL control is created, destroyed or modified inside them.
Sometimes the VCL code has a hidden "RecreateWnd" call inside some other harmless looking function that causes all this issues.

Move all code that modifies VCL controls outside TChromium or TCEFApplication events.

Re: SendMouseWheelEvent does not work

Posted: Thu Feb 27, 2020 5:15 am
by micmorozov
I use version: CEF4Delphi uses CEF 73.1.12 which includes Chromium 73.0.3683.75.

As soon as I change

Code: Select all

TChromium.CreateBrowser(TCEFWindowParent);
to

Code: Select all

TChromium.CreateBrowser(nil)
and use TChromium.OnBeforeClose instead TChromium.OnClose

I receive error system 5

Re: SendMouseWheelEvent does not work

Posted: Fri Feb 28, 2020 6:27 am
by micmorozov
Found a mistake!

I created tabs with Tchromium before the cef had time to initialize

Sometimes managed to initialize sometimes not