Callback_Message / CBMSG

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > DIALOGS > Callback Functions and Meta Functions >

Callback_Message / CBMSG

 

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 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