Re: Can we intercept messages in general?
Then you need to implement a system wide hook, which is a bit of a system
resource hog, and intercept all calls to window procedures and test for the
one you want. You must also place your handler in a DLL so that Windows can
map the DLL into the address space of each process that has a window
receiving messages.
Sound like fun?
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Juan Dent" <Juan_Dent@nospam.nospam> wrote in message
news:05F9DE47-3F33-4ECE-902A-CC0587D8F72F@microsoft.com...
Hi,
Great! And how does this change if the window is in another application?
--
Thanks in advance,
Juan Dent, M.Sc.
"Jonathan Wood" wrote:
If it is in the same application, you can simply call SetWindowLong with
GWL_WNDPROC and implement your own window procedure. Before doing this,
you
should use GetWindowLong to get the original window procedure and then
call
that from your new procedure using CallWindowProc.
The result will be that all messages go through your handler and you'll
be
able to do whatever you like with them, forwarding them to the old
procedure
or preventing them from any further processing.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Juan Dent" <Juan_Dent@nospam.nospam> wrote in message
news:D1AEAC93-7CBE-46E4-9EA0-66F4C02E85AC@microsoft.com...
Hi,
Okay, how is it done? BTW, this is a window inside the same app.
--
Thanks in advance,
Juan Dent, M.Sc.
"Jonathan Wood" wrote:
It is possible to determine which messages are sent to a window. There
is
no
way to detect only those messages that were sent from some other
window.
How to detect messages sent to a window depends on if the window is
part
of
your application or another one.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Juan Dent" <Juan_Dent@nospam.nospam> wrote in message
news:3E4623AE-9404-44DB-A1B8-227A78746E36@microsoft.com...
Hi,
When one class sends a message to another (e.g. via SendMessage),
can
we
intercept this message? How?
I want to find out all the messages that one child window sends
another,
for
instance.
--
Thanks in advance,
Juan Dent, M.Sc.