Windows and events

Create a application based on windows and controls require to process of events, that inform you about what happens on a window. You can process the events with WaitEvent() or ProcessEvent() to get updated information about a window.

When a event is produced, it must be processed with WaitEvent() or ProcessEvent() before access to updated information, after process it with these commands, any event generate four values called hWindow, Message, wParam and lParam, these values can be consulted with commands hWindow(), MessageID(), wParam() and lParam.

hWindow() return the window identifier where the event was produced.
MessageID() return the value to determine the type of event.
wParam() and lParam(), return aditional parameters, that usually inform about control states, ...