问题描述
存在任何Windows api函数以检索Windows处理程序的 WNDPROC
?
Exist any Windows api function to retrieve the WNDPROC
for a Windows Handle?
/ p>
Thanks in advance.
推荐答案
使用。感谢@In silico的提示。
Remember that if you are going to call the obtained window proc, you should do it using CallWindowProc. Thanks to @In silico for the hint.
请注意,返回的值并不总是真正的指针窗口过程。有时它只是一种句柄,它被 CallWindowProc
识别并正确处理。例如,如果您的应用程序是ANSI,但是该窗口属于Unicode组件(反之亦然),则不会获得真正的函数指针。请参阅了解详情。
Please note that the value which is returned is not always the real pointer to the window procedure. Sometimes it's just a kind of handle which is recognized and correctly processed by CallWindowProc
. For example, you'll not get the real function pointer if your application is ANSI, but the window belongs to a Unicode component (or vice versa). See this posting in The Old New Thing for more details.
这篇关于获取WNDPROC的Windows句柄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!