imessagefilter

WM_DESTROY, WM_CLOSE bypassing IMessageFilter

Below is my message filter: bool MyFilter::PreFilterMessage(Message %m){ switch(m.Msg){ case WM_CLOSE: case WM_DESTROY: case WM_NCDESTROY: case WM_QUIT: Debug::WriteLine(L"Gone!"); break; case WM_MOUSEMOVE: Debug::WriteLine(L"A mouse! Catch! Catch!!! CATCH!!"); break; } return false; }...

IMessageFilter's message filter not working for active x control

Hi All I am displaying acrobat reader 5.0 active x control in windows form. I inherited my form class with IMessageFilter and implement the PreFilterMessage function as given below. if (m.Msg == 513)//left button click { int mouseY = HiWord(m.LParam.ToInt32()); int mouseX = LoWord(m.LParam.ToInt32()); // where axAcroPDF1 is pdf contro...

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 control is hosted within the browser. Also ...

Implementing Centralized Hotkey Handling/Processing

I'm working on a project where I need to implement customizable hotkeys across the application. There are a number of different forms and user controls that need to implement different subsets of hotkeys. I would like to implement all of the handling and processing in a central MessageFilter class. I want to have a base class that h...

Why does my IMessageFilter not always work?

I'm working on Word automation and to get rid of "Call was rejected by callee" / "the message filter indicated that the application is busy" errors I implemented an IMessageFilter. The messagefilter works like a charm when I automate Word directly like: Word.Documents.Open(...) Document.SaveAs(...) But when I call TOleContainer.DoVer...