Message object properties
The first four properties of the Message object correspond
to the first four properties of the Microsoft Windows message structure.
Property |
Datatype |
Use |
---|---|---|
Handle |
Integer |
The handle of the window or control. |
Number |
Integer |
The number that identifies the event |
WordParm |
UnsignedInt |
The word parameter for the event (this parameter |
LongParm |
Long |
The long parameter for the event (this |
DoubleParm |
Double |
A numeric or numeric variable. |
StringParm |
String |
A string or string variable. |
PowerObjectParm |
PowerObject |
Any PowerBuilder object type including structures. |
Processed |
Boolean |
A boolean value set in the script for
|
ReturnValue |
Long |
The value you want returned to Windows When Message.Processed is FALSE, this attribute |
Use the values in the Message object in the event script that
caused the Message object to be populated. For example, suppose
the FileExists event contains the following script. OpenWithParm displays
a response window that asks the user if it is OK to overwrite the
file. The return value from FileExists determines
whether the file is saved:
1 |
OpenWithParm( w_question, &<br>   "The specified file already exists. " + &<br>   "Do you want to overwrite it?" )<br>IF Message.StringParm = "Yes" THEN<br>   RETURN 0  // File is saved<br>ELSE<br>   RETURN -1 // Saving is canceled<br>END IF |
For information on Microsoft message numbers
and parameters, see the Microsoft Software Developer’s
Kit (SDK) documentation.