[Lazarus] Windows.PostMessage vs Application.QueueAsyncCall
zeljko
zeljko at holobit.net
Sun Mar 16 09:23:03 CET 2014
On 03/16/2014 02:47 AM, Marcos Douglas wrote:
> 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?
Why you must substitute PostMessage ? I'm using PostMessage successfully
for inter-thread communication,also I'm using QueueAsyncCall when I want
to delay something eg. in OnShow of form ...
zeljko
More information about the Lazarus
mailing list