Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Message Filtering

Message Filtering

Scheduled Pinned Locked Moved C#
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    A T I F
    wrote on last edited by
    #1

    Is there any way to grab all messages of windows, child windows and non windows in an application before they are actually processed....

    A M 2 Replies Last reply
    0
    • A A T I F

      Is there any way to grab all messages of windows, child windows and non windows in an application before they are actually processed....

      A Offline
      A Offline
      A T I F
      wrote on last edited by
      #2

      I forgot to add...in one place so that I can filter them.

      1 Reply Last reply
      0
      • A A T I F

        Is there any way to grab all messages of windows, child windows and non windows in an application before they are actually processed....

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #3

        Create a class which implements the IMessageFilter interface. Add an instance of that class to the Application by calling Application.AddMessageFilter. If you're using .NET Compact Framework, this method is not available. OpenNETCF's Smart Device Framework[^] has an ApplicationEx class to replace Application, which does have this feature. Stability. What an interesting concept. -- Chris Maunder

        A 1 Reply Last reply
        0
        • M Mike Dimmick

          Create a class which implements the IMessageFilter interface. Add an instance of that class to the Application by calling Application.AddMessageFilter. If you're using .NET Compact Framework, this method is not available. OpenNETCF's Smart Device Framework[^] has an ApplicationEx class to replace Application, which does have this feature. Stability. What an interesting concept. -- Chris Maunder

          A Offline
          A Offline
          A T I F
          wrote on last edited by
          #4

          I did exactly that. it works fine for the main application form but when ever there is a model dialog popup the filter does not work on that window.....any idea why

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups