Messages

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:

  • User-initiated ; that is, the message is generated as the result of the user selecting an action-bar item, pressing a key, etc.

  • Application-initiated ; that is, the message is generated by one window within the application for the communication of an event or required action to another window.

  • System-initiated ; that is, the message is generated by Presentation Manager as the result of some system event such as a window having been resized or moved.

    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.


    [Back: Window Procedures]
    [Next: Message Classes]