Page 2 of 2

Re: How to override Render's wndProc

Posted: Wed Sep 19, 2018 9:27 am
by salvadordf
aveliks wrote: Wed Sep 19, 2018 9:00 am Can You explain "I use it from a thread..." more detail or mark on my mistake in code:
I created a custom thread that can receive messages and I call SetWindowsHookEx inside that thread.

Download the code from the first link with a SetWindowsHookEx example :
http://lazplanet.blogspot.com/2016/06/h ... -your.html

Download link :
https://drive.google.com/uc?export=down ... GRIQmdrcjQ

That example updates some labels and memos because it calls SetWindowsHookEx from the main thread.
If you use a custom thread then you need to send messages to the main form and update the labels and memos in the main thread.