PDA

View Full Version : Subclassing windows in another process?


lolslothy
30th November 2005, 01:28 PM
Hi folks,

I'm trying to subclass windows in another process (basically, I'm looking to capture keyboard and mouse events for a text prediction application). I've injected a dll in the process with keyboard focus (using PerformCallBack4), but have been unable to actually subclass a window in the target process.

My DLL performs the SetWindowLong(...), which appears to work (returns the previous window proc handle), but my wndproc is never getting called.

If anyone has any suggestions as to what I might be missing (or doing wrong) I'd be extremely grateful!

Thanks,
Mark

PS I've already succeeded in getting hardware keyboard input using a low-level keyboard hook... The problem is getting SIP activity and, ideally, mouse down & drag events.

lolslothy
30th November 2005, 03:24 PM
Argh, well never mind me... great first impression...

I just noticed that it works fine. The breakpoint in my wndproc replacement simply wasn't being triggered by visual studio. Putting in some event counters show that I'm getting keystrokes and mouse events just fine. Guess it's on to the processing stage.