I modified the "tabbrowser" demo to directly respond to events without using messages, and everything seems to work fine.
Why use "PostMessage" instead of implementing events directly?
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.
Why use "Window Messages" instead direct implementations?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Why use "Window Messages" instead direct implementations?
Many TChromium events are executed in different threads that the main thread.
VCL components are not thread safe and you could have problems if you modify some of their properties inside TChromium events.
I tend to use sync objects and messages with the TChromium events but if your application works fine without messages then don't use them!
VCL components are not thread safe and you could have problems if you modify some of their properties inside TChromium events.
I tend to use sync objects and messages with the TChromium events but if your application works fine without messages then don't use them!

Re: Why use "Window Messages" instead direct implementations?
Understood. Thank you again.