在控件的WinProc中查看消息 [英] Peek messages in the WinProc of a control
本文介绍了在控件的WinProc中查看消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以查看发送给控件的Windows消息。我想阻止某些消息被发送到基类。这是Compact Framework,BTW。
Is it possible to peek the Windows messages being sent to a control. I'd like to prevent certain messages getting sent to the base class. This is the Compact Framework, BTW.
谢谢,
Alain
Thanks,
Alain
推荐答案
从理论上讲,Windows API函数 PeekMessage 应该可以正常工作。尝试从C#调用:
http://www.pinvoke.net/default.aspx/user32.peekmessage 。对于
HWND 参数,请指定控件的 Handle 属性。
Theoretically, the Windows API function PeekMessage should work. Try invoking from C#: http://www.pinvoke.net/default.aspx/user32.peekmessage. For HWND parameter specify Handle property of the control.
这篇关于在控件的WinProc中查看消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文