我正在开发一个涉及键盘钩子(Hook)的 c++ win32 程序。该应用程序是一个没有任何用户界面的 win32 项目。我需要防止应用程序在不使用的情况下关闭,导致 Hook 无法工作或耗尽大量系统资源。我曾经使用消息框,但我需要应用程序完全不可见。
如有任何帮助,我们将不胜感激!
如果您有任何问题,请尽管提问。
最佳答案
我想你需要的是message only window
(MSDN says) A message-only window enables you to send and receive messages. It is not visible, has no z-order, cannot be enumerated, and does not receive broadcast messages. The window simply dispatches messages.
关于c++ - 防止无形式的应用程序因键盘 Hook 而关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/390789/