<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > UI (User Interface) > DIALOGS > Callback Functions and Meta Functions > Callback_Control_Message / CBCTLMSG |
Description
Meta function automatically created by thinBasic engine and valid only inside Callback Functions.
This meta function is valid only inside a Callback Function,
It returns the value of a notification message parameter sent to the callback from a control.
Syntax
msg = CBCTLMSG
alias
msg = Callback_Control_Message
Returns
Number.
Remarks
When a user clicks on a button, types into a text box, or generally interacts with any control in a dialog, Windows sends a message to the callback for the control (or the dialog if the control does not have a callback). CBCTLMSG will return the numeric value of the notification message if CBMSG = %WM_COMMAND. For other values of CBMSG, CBCTLMSG will return message-dependent values.
In other words, CBCTLMSG can only return a valid notification message value if CBMSG indicates that the message includes a notification message. That is, when CBMSG = %WM_COMMAND, CBCTLMSG will contain a notification message value sent by the originating control. For example, CBCTLMSG = %BN_CLICKED when the user clicks a button.
Restrictions
This function is only valid inside a Callback Function.
See also
Examples