Page 1 of 1
Why use "Window Messages" instead direct implementations?
Posted: Wed Jun 20, 2018 6:36 pm
by geziel
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?
Re: Why use "Window Messages" instead direct implementations?
Posted: Thu Jun 21, 2018 3:16 pm
by salvadordf
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!

Re: Why use "Window Messages" instead direct implementations?
Posted: Thu Jun 21, 2018 5:22 pm
by geziel
Understood. Thank you again.