Messages are a fundamental part of GuiDesigner and most programs that interact with GUIs. GuiDesigner communicates within itself, and with your programs, by sending and receiving messages. To communicate with window functions, grid functions, and GuiDesigner, your programs must also send and receive messages.

Processing messages is what animates and gives life to GUIs.

GraphicsDesigner messages
When an event occurs in a graphics window, GraphicsDesigner creates a message to describe it. When a keyboard key is pressed, a WindowKeyDown message is created. When the mouse moves or one of its buttons is pressed, a WindowMouseMove or WindowMouseDown message is created. When a user clicks on an inactive window, a WindowSelected message is created.

In general, whenever the state of the keyboard, mouse, or a window changes, GraphicsDesigner creates a message that describes it. GuiDesigner programs rarely expect window messages such as these. That's because window functions convert window messages into corresponding grid messages like KeyDown , MouseMove , MouseDown and sends them to the appropriate grid.

window messages and grid messages
Any message, like WindowKeyDown or TimeOut , is a window message or a grid message, never both.

window messages
   Names must start with "Window".
   First argument is a window number, window.
   Are sent to window functions by XuiSendMessage().

The following are typical window messages:
  WindowDeselected     WindowHide      WindowMinimize
  WindowDisplayed      WindowHidden    WindowResize
  WindowDestroy        WindowKeyDown   WindowSelect
  WindowDestroyed      WindowKeyUp     WindowSelected

grid messages
   Names must not start with "Window".
   First argument is a grid number, grid.
   Are sent to grid functions by XuiSendMessage().