Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Retrieves a message from the calling thread's message queue.

The function dispatches incoming sent messages until a posted message is available for retrieval.

 

Syntax

 

n = Win_PeekMessage(tagMSG, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg)

 

Returns

 

Number.

If a message is available, the return value is nonzero.

If no messages are available, the return value is zero.

 

Parameters

 

Name

Type

Optional

Meaning

tagMSG

Variable

No

A pointer to an TAGMSG structure that receives message information from the thread's message queue

hWnd

Number

No

A handle to the window whose messages are to be retrieved. The window must belong to the current thread.

wMsgFilterMin

Number

No

The integer value of the lowest message value to be retrieved

wMsgFilterMax

Number

No

The integer value of the highest message value to be retrieved

wRemoveMsg

Number

No

Specifies how messages are to be handled. This parameter can be one or more of the following values:

 

%PM_NOREMOVE

Messages are not removed from the queue after processing by Win_PeekMessage.

 

%PM_REMOVE

Messages are removed from the queue after processing by Win_PeekMessage.

 

%PM_NOYIELD

Prevents the system from releasing any thread that is waiting for the caller to go idle (see WaitForInputIdle).

Combine this value with either %PM_NOREMOVE or %PM_REMOVE.

 

 

Remarks

 

For additional info, please refer to MS documentation at: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644943(v=vs.85).aspx

 

Restrictions

 

See also

 

Examples

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software