|
Right, thanks for that.
That's put me in the right direction. I think I'll just create a
dummy invisible form.
Thanks,
Ross.
----- Original Message -----
Sent: Tuesday, June 28, 2005 4:04
PM
Subject: [Spam] Re: [Spam] Re: [Spam] Re:
[Spam] Re: [Spam] Re: [DUG] Interceptingmessagesin separateunits
Yes. It is possible. The simplest method is to create a
TWincontrol. or a tform
ie TMyMessageForm = class(TForm)
set the caption to
'MyMessageForm01'
findwindow('TMyMessageForm','MyMessageForm01') and
then do a sendmessage.
if you want to do this without creating a tform,
then you really need to analyze how the application, and the tforms create
handles, and allocate WndProcs to them, and use CreateParams features to
assign a classname, and windowname to the handle.
instead of
AllocateHWND there are a series of calls to winapi routines to create the
correct type of handle and then initialize window class parameters, and assign
a wndproc to it.
So It can be done, but it is a big win API topic that
is too big for here.
regards
Kyley
Ross
Levis wrote:
This is a different excercise to the original
problem. I've solved that by sending the handle to the
DLL.
For this next exercise, imagine an
external executable which only knows the Windows class name of myr
application. The other executable does a FindWindow to obtain the
handle of my application and then uses this for SendMessage.
I want to be able to receive and process these
messages inside a component in my application. Is this
possible?
Cheers,
Ross.
|
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi