Event
processing in visual extensions
Contents
A visual extension can have a window procedure that can process any
Windows message or user-defined message. The PBVM passes all such messages
to the visual extension, which can intercept messages and either process
or ignore them.
WindowProc is an application-defined callback function that
processes messages sent to a window. In the example in this section, a
WM_PAINT message is sent to the extension when an action in the
PowerBuilder application causes the window to be redrawn. When the
extension receives the message, it repaints an area in the window using
the current values for text and color set by the user of the
application.
The following example also captures mouse clicks and double clicks,
and triggers the Onclick and Ondoubleclick event scripts in the
PowerBuilder application. You can use two different syntaxes for
describing events:
|
1 2 |
event returnType eventName(args_desc) newline event eventName pbevent_token newline |