Navigation:  thinBasic Modules > UI (User Interface) > Events > Events in Callback Function >

CBMSG

Previous pageReturn to chapter overviewNext page

 

Description

 

Meta function automatically created by thinBasic engine and valid only inside Callback Functions.

 

In a Callback Function, return the  value of the message sent by the caller.

 

Syntax

 

msg = CBMSG

alias

msg = Callback_Message

 

Returns

 

Number.

 

Remarks

 

Each type of message sent to your Callback Function has a unique numeric value. CBMSG will return the actual numeric message value of the message being processed.

The definitions of the numeric values in other functions (CBLPARAM, CBWPARAM, CBCTL, etc) can only be ascertained once CBMSG is identified. Therefore, Callback Functions usually test the value of CBMSG first.

 

In the generally case, a dialog Callback Function should return %TRUE (non-zero) for all %WM_COMMAND messages it processes.

However, this rule cannot be equally applied to other types of messages, since the return value will be message-specific.

 

Restrictions

 

This function is only valid inside a Callback Function.

 

See also

 

Examples