All interaction between the user and windows, or between one window and another in the Presentation Manager environment, takes place by way of messages. Whenever the user presses a key, moves or clicks the mouse, selects an item from a menu, etc., a message is generated and placed on a system message queue. Presentation Manager takes these messages in the order they were received by the system, determines the window for which each message is intended, and routes the message to a message queue belonging to the application that "owns" that window. The application then dequeues each message in turn, and routes the message via Presentation Manager to the window procedure associated with that window, which processes the message.
Messages may be of three types:
A Presentation Manager application has the ability to process messages of any of the three types, which allows the application to respond to any type of event, regardless of its origin.