GetMessage

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > DIALOGS > Dialog Low Level Event Handling > Events in Message Loops >

GetMessage

 

Deprecated function

This function has been deprecated in favor of Dialog Low Level Event Handling.
Do not use this function anymore. This function could be removed in future thinBasic versions.

 

Description

 

Returns the next waiting message present in message queue for the hWnd dialog.

 

Syntax

 

Msg = GetMessage(hWnd, wParam, lParam [, ptrToNMHDR_Structure [, lCBCTL [, lCBCTLMSG]]])

 

Returns

 

Number.

 

Parameters

 

Name

Type

Optional

Meaning

hWnd

Number

No

Handle of the dialog you want to get next message

wParam

Variable

No

A numeric existing variable name. This variable will be filled with additional message-specific information

lParam

Variable

No

A numeric existing variable name. This variable will be filled with additional message-specific information

ptrToNMHDR_Structure

Pointer

Yes

This must be a pointer to a variable of type NMHDR. NMHDR is a structure (UDT) defined as described in Remarks here below. If present, this structure will be automatically filled with notification information received from child controls inside a window.

To use this parameter, pass something like: VARPTR(My_NMHDR) where My_NMHDR is a variable of type NMHDR.

lCBCTL

Variable

Yes

A numeric variable. If present, it will receive the numeric ID value of the control sending the message. In many cases it is equivalent to: LOWRD(wParam)

lCBCTLMSG

Variable

Yes

A numeric variable. If present, it will receive the numeric value of a notification message parameter sent from a control. In many cases it is equivalent to: HIWRD(wParam)

 

Remarks

 

The following is the standard WIN32 NMHDR udt used to get control notifications.

 

  Type NMHDR

    hwndFrom  As DWORD

    idfrom    As DWORD

    code      As LONG

  End Type

 

Restrictions

 

See also

 

PeekMessage, SendMessage, ClearMessages

 

Examples