Is it possible to override MainWndProc

  • Thread starter Thread starter Maxim Kazitov
  • Start date Start date
M

Maxim Kazitov

Hi,

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

Thanks,
Max
 
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]
- (e-mail address removed)

Hi,

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

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

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
 
Back
Top