win12.hlp (Table of Contents; Topic list)
WinQueryQueueStatus (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMESSAGEMGR
 
ULONG WinQueryQueueStatus(hwndDesktop);
HWND hwndDesktop;    /* handle of the desktop */
 
The WinQueryQueueStatus function returns a code that indicates the status of
the message queue associated with the current queue.
 
This function is very fast and is typically used inside loops to determine
whether the WinGetMsg or WinPeekMsg function should be called to process
input.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
hwndDesktop  Identifies the desktop window. This parameter can be
             HWND_DESKTOP or the desktop window handle.
 
Return Value
 
The high word of the return value indicates the types of messages currently
in the queue. The low word of the return value shows the types of messages
added to the queue since the last call to WinQueryQueueStatus that are still
in the queue.
 
The following list describes the types of messages that may be in the
queue:
 
Value           Meaning
────────────────────────────────────────────────────────────────────────────
QS_KEY          A WM_CHAR message is in the queue.
 
QS_MOUSE        A WM_MOUSEMOVE or WM_BUTTON message is in the queue.
 
QS_MOUSEBUTTON  A WM_BUTTON message is in the queue.
 
QS_MOUSEMOVE    A WM_MOUSEMOVE message is in the queue.
 
QS_PAINT        A WM_PAINT message is in the queue.
 
QS_POSTMSG      A posted message other than those listed above is in the
                queue.
 
QS_SEM1         A WM_SEM1 message is in the queue.
 
QS_SEM2         A WM_SEM2 message is in the queue.
 
QS_SEM3         A WM_SEM3 message is in the queue.
 
QS_SEM4         A WM_SEM4 message is in the queue.
 
QS_SENDMSG      A message sent by another application is in the queue.
 
QS_TIMER        A WM_TIMER message is in the queue.
 
See Also
 
WinGetMsg, WinPeekMsg