Purpose |
To provide a call-back function for a given Windows message. |
Syntax |
winio@('%mg', msg_no, cb_func) |
Description |
This format provides direct access to specified Windows messages. It should be used with care since it is possible to interfere with other ClearWin+ processing. msg_no is the message number of the message to be processed. User numbers should begin at WM_USER +1000. cb_func is the call-back function that is to be called when the message is received. The call-back function can use CLEARWIN_INFO@ with the strings 'MESSAGE_HWND', 'MESSAGE_WPARAM', and 'MESSAGE_LPARAM' in order to get the standard arguments for a Windows call-back function. When writing the %mg call-back function, use a return value of 3 if you want ClearWin+ to apply the default processing of the message msg_no. Other values have the usual effect (zero closes the window etc.) but cause the default processing to be bypassed. Occasionally the internal Windows dialog procedure that processes messages requires a particular return other than the default value which is zero (e.g. under certain conditions when using WM_NOTIFY). In this case you should make a call to the subroutine: SUBROUTINE SET_MG_RETURN_VALUE@(MSG) before returning. This subroutine takes one integer argument which is the value to be returned by the internal Windows dialog procedure. |
See also |