AxAcroPDF swallowing keys, how to get it to stop?

前端 未结 4 401
自闭症患者
自闭症患者 2021-01-14 11:46

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

4条回答
  •  情话喂你
    2021-01-14 12:00

    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.

提交回复
热议问题