WinLib.MessageMonitor - charonn0/WinLib GitHub Wiki

WinLib.MessageMonitor

##Class Declaration

    Class MessageMonitor
    Implements WinLib.Win32Object

##Notes This class allows RB applications to capture Window Messages sent by the system to a window or control. Window Messages are used to inform applications of user actions, events, and other useful things. For example the WM_PAINT message tells a window to repaint itself and WM_HOTKEY indicates that a global hotkey combo was pressed. See the HotKeyMonitor class for using Hotkeys. For more information, refer to the Window Message documentation on MSDN.

By default, all window messages are immediately passed on to the RB framework for normal processing. Use the AddMessageFilter method to specify which window messages you would like to receive. Return True from the WindowMessage event to prevent the message from being passed on to the framework.

Each MessageMonitor instance must belong to a window or a control. If no window/control is specified to the Constructor (specifically, the handle property of the Window/Control) then your app's frontmost window will be used (AKA Window(0))

Each instance can handle any number of message types, but can only have one owning window/control.

Avoid performing any lengthy actions directly in the WindowMessage event. Otherwise Windows (the OS) may report that the application is "Not Responding."

This class implements the Win32Object interface.

##Event Definitions

##Methods

##Properties

##Shared Properties

##Shared Methods