[Lazarus] Windows.PostMessage vs Application.QueueAsyncCall

Marcos Douglas md at delfire.net
Sun Mar 16 02:47:25 CET 2014


Hi,

Like all Windows programmer, I use PostMessage/SendMessage a lot.
Lazarus team has created Application.QueueAsyncCall method to
substitute the (old) "Windowish" method todo async calls aka
PostMessage.

Ok. But what is the best way to use QueueAsyncCall when the caller to
not knows what type is the receiver?

PostMessage only need to know a Handler and a Integer (message). It
can send a broadcast message as well.

QueueAsyncCall need to know the instance and the method to call...


So, what the best way to substitute PostMessage?
Maybe using QueueAsyncCall  +  IFPObserved/IFPObserver?

Thanks,
Marcos Douglas




More information about the Lazarus mailing list