


The EVENT-CONTROL-HANDLE and EVENT-CONTROL-ID values will always be zero (NULL) when a window event occurs. The values returned are stored as signed integers and may return negative values.
CMD-CLOSE (value 1) This event indicates that the user has selected the close option from the active window's system menu. The application should respond by hiding or destroying the window. The EVENT-WINDOW-HANDLE data item will contain the handle of the window that the user wants to close. The EVENT-DATA-1 and EVENT-DATA-2 values are not used. Note that floating windows always return the exception CMD-CLOSE. Also note that the runtime configuration variable QUIT-MODE affects only the main application window. All other windows in the application return the event CMD-CLOSE when the close button is clicked.
CMD-ACTIVATE (value 6) This event occurs when a window is activated by the user, but only if the previously active window belongs to the same program (i.e., the user switches windows within the program, and does not transfer control from another program). The normal response is to ACCEPT something in the newly active window, making it the active window from the program's point of view. If you use either the LINK or BIND TO THREAD options when creating the window, then the runtime can automatically handle this event. The EVENT-DATA-1 and EVENT-DATA-2 values are not used. Threads are discussed in detail in Book 1, Chapter 6, "Programmer's Guide."
NTF-RESIZED (value 4114) This event occurs when a resizeable window that does not have AUTO-RESIZE specified is resized by the user. The application typically reconstructs the screen in response. EVENT-DATA-1 contains the new height and EVENT-DATA-2 contains the new width, both measured in hundredths of cells (e.g., an 80-column wide screen is expressed as "8000"). Use the INQUIRE verb to obtain the new dimensions.