[DUG] Applicarion.ProcessMessage

Pieter De Wit pieter at insync.za.net
Tue Oct 29 19:12:54 NZDT 2013


On 29/10/2013 17:02, Ross Levis wrote:
>
> I'm wondering if any experts out there can help with this issue.
>
> I'm loading a 3^rd party DLL which needs to have Windows messages sent 
> to the DLL from my app for navigation purposes.  It has been 10 years 
> since I implemented this code which someone else gave me...
>
> procedure TEngine.ProcessMessage(var Msg: tagMSG; var Handled: Boolean);
>
> begin
>
>   if not IsChild(Engine.Handle,Msg.hwnd) then
>
>   try
>
>     Handled := IsDialogMessage(GetParent(msg.hwnd),Msg);
>
>   except
>
>     Handled := False;
>
>   end;
>
> end;
>
> Application.OnMessage := ProcessMessage;
>
> Without this the DLL GUI would not show which component had the focus, 
> which was a problem for blind users using the tab key.
>
> The problem:  When the DLL is doing something that takes several 
> seconds, the function above appears to hang waiting for the DLL to 
> finish, and this causes the main thread in my app to also hang.
>
> Is there any way around that, such as using a separate thread to 
> process these messages?  That would be somewhat out of my league.
>
> Cheers,
>
> Ross.
>
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with Subject: unsubscribe
Hi,

Have you changed Delphi Versions ? (10 years is a long time :) )

Cheers,

Pieter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20131029/a6c20cf2/attachment-0001.html 


More information about the Delphi mailing list