Navigation:  thinBasic Modules > UI (User Interface) > DIALOGSs >

DIALOG POST

Previous pageReturn to chapter overviewNext page

 

Description

 

Place a message in the message queue of the specified dialog.

The message is processed by the dialog at a later time, when it reads the message from the queue.

 

Syntax

 

DIALOG POST hwnd, Msg, wParam, lParam

 

Returns

 

None

 

Parameters

 

Name

Type

Optional

Meaning

hwnd

Number

No

Handle of the dialog you want to send a message to

Msg

Number

No

The message you want to send to the dialog

wParam

Number

No

First parameter. This value is Msg dependant

lParam

Number

No

Second parameter. This value is Msg dependant

 

Remarks

 

DIALOG POST is different to the DIALOG SEND, which forces the dialog/control to process the message immediately before returning.

DIALOG POST is an asynchronous operation.

 

To post a custom message to a dialog, use a message value in the range of (%WM_USER + 500) to (%WM_USER + &H07FFF), or use the RegisterWindowMessage API to obtain a unique message value from the operating system. Using messages with a numeric value of less then %WM_USER + 500 may conflict with Windows Common Control messages.

 

By default, thinBasic passes these parameters BYVAL.

If the target dialog is expected to return or alter the values passed in the wParam and lParam parameters, pass them using VARPTR or the return values will be discarded.

For example:

 

DIALOG POST CBHNDL%WM_USER + 999VARPTR(Param1&), VARPTR(Param2&)

 

Restrictions

 

See also

 

Examples