Yuri Dario wrote:
> Hi Philipp,
>
>> Actually I think you're quite wrong here :-) SendMessage will call the
>> WinProc directly in the other thread (switching to that thread, or so
>> says the msdn documentation). The solar mutex is not involved here
>
> I don't think SendMessage will switch thread: if you execute
> sendmessage from thread#2, the window procedure will be executed in
> thread#2. This was true in earlier windows versions, but should be
> still true for backward compatibility.
As I said I'm far from an expert on Windows API, however MSDN states in
its docuementation for SendMessage:
<quote>
If the specified window was created by the calling thread, the window
procedure is called immediately as a subroutine. If the specified window
was created by a different thread, the system switches to that thread
and calls the appropriate window procedure.
</quote>
> usually the thread must be the same, but given the difficult to create
> windows in differents threads and keep track of them, it results more
> easier to handle messaging in thread 1.
Then we are on the same track, the SendMessage mechanism in vcl's
Windows implementation tries to ensure exactly that.
Kind regards, pl
--
If you give someone a program, you will frustrate them for a day;
if you teach them how to program, you will frustrate them for a lifetime.
-- Author unknown
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]