MDI - Imessagefilter

S

See Sharp

Hello all,

I have a form class that implements the imessagefilter interface

public class frmMain : System.Windows.Forms.Form, IMessageFilter

I also have this implemented
bool IMessageFilter.PreFilterMessage( ref Message m )

This class actually interacts with the twain driver and that's why I need
the messagefilter, to get the twain messages. When I call this class as an
mdichild, I am not able to acquire images. I assume, this is because the
messages don't reach the child window. Is this right ? In that case, how can
we overcome this ? Should the parent also implement imessagefilter ? And
then how can the parent window pass the messages to the child window ?

Thanks
Seesharp

--
 
N

Nicholas Paldino [.NET/C# MVP]

Seesharp,

You can have the parent implement IMessageFilter and then have some sort
of callback/event mechanism of your own design that will notify listeners
when twain messages come in through the message pump.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top