Recent

Author Topic: [Solved] Focus Tracker (component tracking focus changes and cause)  (Read 14426 times)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: [Solved] Focus Tracker (component tracking focus changes and cause)
« Reply #30 on: September 01, 2017, 09:52:39 pm »
So I was thinking:
i.    The new limitation I added.  ( no. 8 )
ii.   There's a main message loop for each application.
iii.  Would it be possible to intercept messages at a [deeper/more centralised] level instead of hooking into each control?

Depends on the message you want to intercept. Some are system based and you can intercept them by replacing the main message handling procedure (only on windows) and some are framework generated and you can't easily.
As far as I know and I might be wrong here in lazarus there is no main application message handling. Each form gets its messages directly from the OS and passes them along to each children.
see http://forum.lazarus.freepascal.org/index.php/topic,5705.0.html for info on how to intercept the messages.


And btw, where is the application main message loop to be found?
Is that widget domain?
See the method application.run in the forms unit, it is a bit of a chase to get to the point and you will see that the loop is not widget set based but the handler is.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018