MDI - Imessagefilter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • See Sharp

    #1

    MDI - Imessagefilter

    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. PreFilterMessag e( 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

    --
    -------------------------------------------------------------
    Don't be dismayed at good-byes. A farewell is necessary before you can meet
    again. And meeting again, after moments or lifetimes, is certain for those
    who are friends.
    ~~~Illusions: The Adventures of a Reluctant Messiah


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: MDI - Imessagefilter

    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.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - nicholas.paldin o@exisconsultin g.com

    "See Sharp" <smitha@inapp.c om> wrote in message
    news:OLF9lkzVDH A.3924@tk2msftn gp13.phx.gbl...[color=blue]
    > 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. PreFilterMessag e( 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[/color]
    can[color=blue]
    > 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
    >
    > --
    > -------------------------------------------------------------
    > Don't be dismayed at good-byes. A farewell is necessary before you can[/color]
    meet[color=blue]
    > again. And meeting again, after moments or lifetimes, is certain for those
    > who are friends.
    > ~~~Illusions: The Adventures of a Reluctant Messiah
    >
    >[/color]


    Comment

    Working...