Win32中的多个WndProc函数 [英] Multiple WndProc functions in Win32
本文介绍了Win32中的多个WndProc函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这可能是一个愚蠢的问题,但是你可以在Win32中注册多个WndProc函数?例如一个框架捕获一些消息,我的应用程序对其他的感兴趣 - 如何在不修改框架代码的情况下捕获它们?
This might be a dumb question, but can you register multiple WndProc functions in Win32? e.g. a framework catches some messages and my app is interested in other ones - how do I catch them without modifying the framework code?
推荐答案
如果我正确理解您的意图,您可以通过设置挂钩。假设你知道你想要挂钩的消息循环的线程,你可以这样做(未选中):
If I understand your intention correctly, you can do that by setting a hook. Assuming you know the thread whose message loop you'd like to hook, you can do something along these lines (unchecked):
SetWindowsHookEx(WH_CALLWNDPROC, yourHOOKPROC, NULL, theThreadId);
这篇关于Win32中的多个WndProc函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文