Window messaging
Previous  Next

Most of the work in Windows is done by passing messages around between windows and the Operating System (OS). Each window has a, usually quite complicated, Window Procedure (WndProc) that deals with the messages it receives. This library lets you intercept those messages before they are processed by the underlying control. If the ReturnHandled property is set to True then the underlying control does not get the message, if False then it does receive the message.

The messages are fed to a window from the windows' Message Queue. Messages from the OS and other windows are posted to this queue and processed by the window in the order of their arrival.

Each message comprises a number that identifies the message and two Int32 parameters called wParam and lParam. The contents of lParam and wParam depend upon the message. To use this library you will need to know the number identifying the messages that you want to intercept and the meaning (if any) of their lParam and wParam parameters.

Lists of Windows events can be found here

 http://wiki.winehq.org/List_Of_Windows_Messages

and here

 http://www.autohotkey.com/docs/misc/SendMessageList.htm

A useful windows spy application (Winspector) can be downloaded here http://www.windows-spy.com/