[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
PeekMessage( @cMsg, hWnd, nFiltFirst, nFiltLast, nRemove) -> lresult
------------------------------------------------------------------------------
PARAMETER:
<cMsg> This character var will contain a MSG structure after
the call with message information from the application's
message queue. It therefore must be passed by reference ( @ )
<hwnd> The handle of the window whose messages are to be examined.
PeekMessage retrieves only messages associated with the
window identified by hWnd, or any of its children, and
within the range of message values given by the nFiltFirst
and nFiltLast parameters.
If hwnd is NULL, PeekMessage retrieves messages for any
window that belongs to the application making the call.
<nFiltFirst> specifies the value of the first message in the range of
messages to be examined. If nFiltFirst and nFiltLast are
both zero, the filter is disabled and PeekMessage returns
all available messages.
The WM_KEYFIRST ( 100h ) and WM_KEYLAST ( 108h ) flags
can be used as filter values to retrieve all key messages;
the WM_MOUSEFIRST ( 200h ) and WM_MOUSELAST ( 209h ) flags
can be used to retrieve all mouse messages.
<nFiltLast> specifies the value of the last message in the range of
messages to be examined.
<nRemove> Removal-Flags, which specify how messages are handled.
This parameter can be a combination of the following values
Value Meaning
PM_NOREMOVE (0) Messages are not removed from the queue
after processing by PeekMessage.
PM_NOYIELD (1) Prevents the current task from halting and
yielding system resources to another task.
PM_REMOVE (2) Messages are removed from the queue after
processing by PeekMessage.
DESCRIPTION:
The PeekMessage function checks the application's message queue for a
message and places the message (if any) in the specified cMSG structure.
PeekMessage does not remove messages from the queue. The messages remain
in there until processed. Unlike the GetMessage function, PeekMessage
does not wait for a message to be placed in the queue before returning.
PeekMessage yields control to other tasks, unless the PM_NOYIELD flag
is set.
However, if there is a WM_TIMER message pending, PeekMessage will yield
regardless of the PM_NOYIELD flag.
RETURNS:
The return value is TRUE if a message is available, and FALSE if not.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson