views:

36

answers:

1

The AxAcroPDF swallows all key-related events as soon as it gets focus, including shortcuts, key presses, etc. I added a message filter, and it doesn't get any key-related messages either. It's a COM component, could that be relevant?

Is there any way to catch these before the control starts swallowing them?

+1  A: 

It is an out-of-process COM component, that's the problem. Completely in violation of Windows SDK requirements as laid out in SetParent(). Once its window gets the focus, the message loop in the acroread.exe process gets all the messages, your message filter cannot see any messages anymore.

Technically it is fixable by using SetWindowsHookEx() to inject a DLL into the process and monitor messages with WH_GETMESSAGE. But you can't write such a DLL in the C# language.

Major suck, I know. There never seems to be any lack of it with that program.

Hans Passant
Adobe violating the SDK requirements? Say it ain't so!The fix sounds like a bit more effort than I can justify for my needs at the moment, but good to know in case that changes in the future.
Jivlain