This sample shows you how to respond to an event occurring within your application. It also demonstrates the use of a WEL_MSG_BOX control and a redefinition of closeable from WEL_COMPOSITE_WINDOW .

step2

Compiling

  • Launch EiffelStudio.
  • Click Add project
  • Browse to $ISE_EIFFEL\examples\wel\tutorial\step2\.
  • Choose tutorial_step2.ecf
  • Choose the location where the project will be compiled, by default the same directory containing the configuration file.
  • Click OK.

Running

After launching the sample, you should see a WEL_FRAME_WINDOW displayed. If you click the left mouse button in the client area of the window, a WEL_MSG_BOX will appear, notifying you of your click.

Under the Hood

This system is a demonstration of how to connect an event to one of the common message hooks available within WEL. See Common message hooks for more information. In this example, on_left_button_down has been redefined from WEL_WINDOW to display a WEL_MSG_BOX containing notification of the event occurring.

If you look at closeable from MAIN_WINDOW, you will see that it has been redefined to display a WEL_MSG_BOX and the result from this message box is used to generate the return value of closeable. If this Result is True, the window will be closed. This sample contains the following classes:

  • TUTORIAL_STEP2
  • MAIN_WINDOW

See Also:
Common message hooks

f4a73538-8a2f-ce6b-5190-6bd4d0e8c8d1
cached: 05/24/2017 10:58:27.000 PM