Connecting Tech Pros Worldwide Forums | Help | Site Map

Is it possible to override MainWndProc

Maxim Kazitov
Guest
 
Posts: n/a
#1: Nov 15 '05
Hi,

Is it possible to override MainWndProc using c# (for window in other process).

Thanks,
Max

Nicholas Paldino [.NET/C# MVP]
Guest
 
Posts: n/a
#2: Nov 15 '05

re: Is it possible to override MainWndProc


Maxim,

I don't believe you can override the function, however, you should be
able to set up a windows hook that will allow you to monitor all the
messages that are processed by the machine, and then selectively process the
ones that are targeted for the process in question.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

"Maxim Kazitov" <mvkazit@tut.by> wrote in message
news:ewE5QnS4DHA.2648@tk2msftngp13.phx.gbl...
Hi,

Is it possible to override MainWndProc using c# (for window in other
process).

Thanks,
Max


Mattias Sjögren
Guest
 
Posts: n/a
#3: Nov 15 '05

re: Is it possible to override MainWndProc


[color=blue]
>Is it possible to override MainWndProc using c# (for window in other process).[/color]

No, cross process subclassing isn't possible (in any language, not a
C# limitation). That requires a hook or injecting code into the other
process some other way.



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Closed Thread