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.
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.
SendMouseWheelEvent does not work
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: SendMouseWheelEvent does not work
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
https://github.com/salvadordf/CEF4Delphi/issues/249
https://bitbucket.org/chromiumembedded/ ... n-osr-mode
-
- Posts: 18
- Joined: Mon Oct 07, 2019 7:53 am
Re: SendMouseWheelEvent does not work
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
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
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: SendMouseWheelEvent does not work
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.
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.
-
- Posts: 18
- Joined: Mon Oct 07, 2019 7:53 am
Re: SendMouseWheelEvent does not work
I use version: CEF4Delphi uses CEF 73.1.12 which includes Chromium 73.0.3683.75.
As soon as I change
to
and use TChromium.OnBeforeClose instead TChromium.OnClose
I receive error system 5
As soon as I change
Code: Select all
TChromium.CreateBrowser(TCEFWindowParent);
Code: Select all
TChromium.CreateBrowser(nil)
I receive error system 5
-
- Posts: 18
- Joined: Mon Oct 07, 2019 7:53 am
Re: SendMouseWheelEvent does not work
Found a mistake!
I created tabs with Tchromium before the cef had time to initialize
Sometimes managed to initialize sometimes not
I created tabs with Tchromium before the cef had time to initialize
Sometimes managed to initialize sometimes not