Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WinPeekMsg (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINMESSAGEMGR
BOOL WinPeekMsg(hab, pqmsg, hwndFilter, msgFilterFirst, msgFilterLast,
fs)
HAB hab; /* handle of the anchor block */
PQMSG pqmsg; /* address of structure */
HWND hwndFilter; /* handle of the filter window */
USHORT msgFilterFirst; /* first message */
USHORT msgFilterLast; /* last message */
USHORT fs; /* status of message in queue */
The WinPeekMsg function inspects the thread's message queue.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hab Identifies the anchor block.
pqmsg Points to the QMSG structure.
hwndFilter Identifies the window filter.
msgFilterFirst Specifies the first message.
msgFilterLast Specifies the last message.
fs Specifies whether to remove the message from the queue. If
this parameter is PM_REMOVE, the message is removed from the
queue. If this parameter is PM_NOREMOVE, the message remains
in the queue. An application should specify only one of
these flags.
Return Value
The return value is TRUE if a message is available, or it is FALSE if no
message is available.
Comments
This function is identical to the WinGetMsg function, except that it does
not wait for the arrival of a message and allows for leaving the message in
the queue.
The constants WM_MOUSEFIRST and WM_MOUSELAST can be used for msgFilterFirst
and msgFilterLast to filter all but mouse messages.
The constants WM_BUTTONCLICKFIRST and WM_BUTTONCLICKLAST can be used for
msgFilterFirst and msgFilterLast to filter all but mouse button messages.
The constants WM_DDE_FIRST and WM_DDE_LAST can be used for msgFilterFirst
and msgFilterLast to filter all but dynamic data exchange messages.
See Also
WinGetMsg, QMSG
♦