Purpose |
Specify which messages should be sent to a Control Callback Function. |
Syntax |
#MESSAGES COMMAND |
Remarks |
#MESSAGES COMMAND specifies that only %WM_COMMAND messages be sent to Control Callback Functions, just as in earlier versions of PowerBASIC #MESSAGES NOTIFY specifies that %WM_NOTIFY messages (as well as %WM_COMMAND messages) be sent to Control Callback Functions. This is the default condition, and need not be explicitly stated. There are two general types of CallBack Functions.
The first
is the DIALOG CALLBACK, which is specified
with the CALL DLGPROC clause of the
Prior to version 9.0 of PowerBASIC for Windows, Control Callback Functions received only %WM_COMMAND messages. Beginning with PB 9.0, %WM_NOTIFY messages are sent as well. There are many situations where these added messages will prove to be very important to you. If your existing callback functions are written with complete error checking (ensuring that CB.MSG = %WM_COMMAND), this minor addition will cause no problems. It just presents additional information which can be acted upon, or just ignored. However, if callbacks were written without complete error checking, some ambiguity is possible. In this case, you should either update your Control Callback code, or suppress %WM_NOFITY messages with a #MESSAGES Command metastatement. |
See also |
Callbacks, DIALOG SHOW MODAL, DIALOG SHOW MODELESS, FUNCTION/END FUNCTION |