I've registered a message filter using
Application.AddMessageFilter(m_messageFilter);
using this I can log all of the mouse clicks a user makes in the application's user interface.
However, one dialog is run on a separate thread, with code something like:
void Run()
{
using( MyDialog dialog = new MyDialog() )
{
dialog.ShowDialog();
}
}
Thread thread = new Thread(Run);
The message filter I set up doesn't get to see messages that go to this window. How can I get them (ideally without being too intrusive)?
I tried to override MyDialog.PreProcessMessage, but I'm confused that this never seems to get called.
Thanks.