开发者

PreFilterMessage is not called when hosting C# control within Internet Explorer

Here is a sample: 1. Create a class 'public class RichTextBoxEx : RichTextBox, IMessageFilter'. 2. Implement 'public bool PreFilterMessage(ref Message m)'. 3. Enter into edit mode of the control and type any text.

The result is as describe above... the 'PreFilterMessage' is not called when the cont开发者_如何学运维rol is hosted within the browser. Also by giving the FullTrust access to control the PreFilterMessage is not getting called


Not all messages are passed through the PreMessageFilter mechanism. Only the messages that are posted to your control are filtered - direct messages are not filtered.

Override the WndProc() function to filter all kinds of messages.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜