[DUG] Applicarion.ProcessMessage
Ross Levis
ross at stationplaylist.com
Tue Oct 29 17:02:11 NZDT 2013
I'm wondering if any experts out there can help with this issue.
I'm loading a 3rd 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20131029/61427583/attachment.html
More information about the Delphi
mailing list