Function WaitWindowEvent

Top 

 

Declaration:

void WaitWindowEvent(unsigned long handle);

Description

Allows to organize interaction between user and the User window and the окно Поток ввода/вывода. The function waits for an event associated with the specified window and returns control to the script file, when the event occurs. The function locates type of the occurred event and places relevant data into the internal variables accessible with the following functions:

LastEvent

LastEventInt{1...4}

Example

ulong handle = OpenUserWindow("Interactive Window");

while (1)

{

WaitWindowEvent(handle);

switch (LastEvent(handle))

{

  case WE_CLOSE:         return;          // window is closed, script file is being completed

  case WE_REDRAW:        Redraw(handle);  // to call our function Redraw,

 

  case WE_MOUSEBUTTON:   Change(handle);  // to call our function Change,

                         break;           // that responds to the clicked

                                          // mouse button

 

}