Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我设置了一个低级鼠标钩子,WH_MOUSE_LL当 我单击[x](关闭)按钮时,窗口会延迟约 500 毫秒,然后消失。
WH_MOUSE_LL
你知道导致延迟的原因吗?而且,有办法解决吗?
(窗口和钩子是通过直接调用 C++ 中的 win32 api 创建的)
WH_MOUSE_LL 是一种与大多数其他钩子不同的钩子。它是通过直接调用钩子过程而不是注入DLL来实现的。这需要一个消息循环来主动抽水。关闭窗口后不再存在的可能性很高。确保在 WM_CLOSE 消息处理程序中取消挂钩。