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.

about Chromium1RenderCompMsg

Post Reply
coater
Posts: 135
Joined: Sat Sep 29, 2018 1:51 pm

about Chromium1RenderCompMsg

Post by coater »

1.where to find some introduction to Chromium1RenderCompMsg? Thank you!

2. How to rightly operate new window in the Chromium1BeforePopup procedure.
sometimes, only using targetUrl is not enough to open new window using self defined form.

Thank you very much!
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: about Chromium1RenderCompMsg

Post by salvadordf »

coater wrote: Mon Jun 29, 2020 3:05 pm 1.where to find some introduction to Chromium1RenderCompMsg? Thank you!
That event was added to intercept Windows messages sent to the browser. The MiniBrowser demo uses it to get the mouse coordinates.
coater wrote: Mon Jun 29, 2020 3:05 pm 2. How to rightly operate new window in the Chromium1BeforePopup procedure.
sometimes, only using targetUrl is not enough to open new window using self defined form.
The PopupBrowser and PopupBrowser2 demos show how to create popup windows using that event in OSR mode and normal mode respectively.
Read the code comments for more details.
coater
Posts: 135
Joined: Sat Sep 29, 2018 1:51 pm

Re: about Chromium1RenderCompMsg

Post by coater »

Thank you for your help!

Is Chromium1AfterCreated procedure use a different thread?

If I create a tabsheet in this procedure I found that its thread ID is different from form. (use microsoft spy++)
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: about Chromium1RenderCompMsg

Post by salvadordf »

In normal circumstances, most of the TChromium and GlobalCEFApp events are executed in CEF threads, different than the main application thread.

I simplified the code in the demos to make them a little easier to understand but you should never modify, create or destroy any VCL or FMX control inside those events.
coater
Posts: 135
Joined: Sat Sep 29, 2018 1:51 pm

Re: about Chromium1RenderCompMsg

Post by coater »

Thank you!

Can browser be used as the follows in the Chromium1BeforePopup procedure ?
SendMessage(Handle, MINIBROWSER_DOCKWIN_MESSAGE, 1,Integer(@browser) );
or a record contains browser?
SendMessage(Handle, MINIBROWSER_DOCKWIN_MESSAGE, 1,Integer(@arecord ) );
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: about Chromium1RenderCompMsg

Post by salvadordf »

I've never done that with a browser but I would try to do what Chromium expects us to do to avoid crashes.
coater
Posts: 135
Joined: Sat Sep 29, 2018 1:51 pm

Re: about Chromium1RenderCompMsg

Post by coater »

:D Thank you!
Post Reply