WinQueryQueueStatus
Appearance
This function returns a code indicating the status of the message queue associated with the caller.
Syntax
WinQueryQueueStatus(hwndDesktop)
Parameters
- hwndDesktop (HWND) - Input
- Desktop-window handle (HWND_DESKTOP or from WinQueryDesktopWindow).
- flStatus (ULONG) - Returns
- Status information as a combination of QS_* flags.
Returns
- flStatus (ULONG) - returns
- Status information.
- QS_KEY
- A WM_CHAR message is in the queue due to a keyboard or journaling event.
- QS_MOUSE
- A mouse-related message (WM_MOUSEMOVE, WM_BUTTON1UP, WM_BUTTON1DOWN, WM_BUTTON1DBLCLK, WM_BUTTON2UP, WM_BUTTON2DOWN, WM_BUTTON2DBLCLK, WM_BUTTON3UP, WM_BUTTON3DOWN, WM_BUTTON3DBLCLK) is in the queue.
- QS_MOUSEBUTTON
- A mouse button message (WM_BUTTON1UP, WM_BUTTON1DOWN, WM_BUTTON1DBLCLK, WM_BUTTON2UP, WM_BUTTON2DOWN, WM_BUTTON2DBLCLK, WM_BUTTON3UP, WM_BUTTON3DOWN, WM_BUTTON3DBLCLK) is in the queue.
- QS_MOUSEMOVE
- A WM_MOUSEMOVE message is in the queue.
- QS_TIMER
- A WM_TIMER message is in the queue.
- QS_PAINT
- A WM_PAINT message is available.
- QS_SEM1
- A WM_SEM1 message is available.
- QS_SEM2
- A WM_SEM2 message is available.
- QS_SEM3
- A WM_SEM3 message is available.
- QS_SEM4
- A WM_SEM4 message is available.
- QS_POSTMSG
- A message has been posted to the queue (could be any message, but the specific QS_* flag might not be set).
- QS_SENDMSG
- A message has been sent by another application to a window in this queue's thread.
- Added (subset of the above flags)
- Message types added to the queue since the last call to this function.
Remarks
This function provides an efficient way to check if input is available for WinGetMsg or WinPeekMsg.
Example Code
#define INCL_WINMESSAGEMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwndDesktop; /* Desktop-window handle. */ ULONG flStatus; /* Status information. */ flStatus = WinQueryQueueStatus(hwndDesktop);
This example uses WinQueryQueueStatus to check if a WM_MOUSEMOVE message is in the queue.
#define INCL_WINMESSAGEMGR #include <OS2.H> if(WinQueryQueueStatus(HWND_DESKTOP) == QS_MOUSEMOVE) { /* ... */ /* ... */ }
Related Messages
- WM_BUTTON1UP
- WM_BUTTON1DOWN
- WM_BUTTON1DBLCLK
- WM_BUTTON2UP
- WM_BUTTON2DOWN
- WM_BUTTON2DBLCLK
- WM_BUTTON3UP
- WM_BUTTON3DOWN
- WM_BUTTON3DBLCLK
- WM_CHAR
- WM_MOUSEMOVE
- WM_PAINT
- WM_SEM1
- WM_SEM2
- WM_SEM3
- WM_SEM4
- WM_TIMER
Related Functions
- WinBroadcastMsg
- WinCreateMsgQueue
- WinDestroyMsgQueue
- WinDispatchMsg
- WinGetDlgMsg
- WinGetMsg
- WinInSendMsg
- WinPeekMsg
- WinPostMsg
- WinPostQueueMsg
- WinQueryMsgPos
- WinQueryMsgTime
- WinQueryQueueInfo
- WinSendDlgItemMsg
- WinSendMsg
- WinSetClassMsgInterest
- WinSetMsgInterest
- WinSetMsgMode
- WinSetSynchroMode
- WinWaitMsg