- 19.05 (released) ...
Common message hooks
Each WEL library component implements a set of routines for processing the most common messages that a component receives. For example, looking at WEL_FRAME_WINDOW , you will see that there are many features which begin
on_. Each of these features enable the user to know when a specific event has occurred, and to perform the appropriate processing as a result of this event. Most of the time, you will only be interested in a small subset of these, necessary to your program. For example, below is the code for on_paint:
on_paint (paint_dc: WEL_PAINT_DC; invalid_rect: WEL_RECT)
--Draw a centered text
An on_paint message corresponds to the Wm_paint message generated by Windows whenever it needs to re-paint a window, and if you look at the feature, you can see that the arguments are a WEL_PAINT_DC and a WEL_RECT . which are relevant to this message. By redefining this feature (and others as required), your code will be able to respond appropriately to windows events.
For different messages received by a control, the arguments will differ (sometimes there are none), but those arguments will always be relevant to the message. For example, on_menu_command from WEL_COMPOSITE_WINDOW has an