subcalls.hlp (Topic list)
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.
MouGetNumQueEl (1.2)
Overview  Changes                                 Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_MOU
 
USHORT MouGetNumQueEl(pmouqi, hmou)
PMOUQUEINFO pmouqi;    /* pointer to structure for number of events */
HMOU hmou;             /* mouse handle                              */
 
The MouGetNumQueEl function retrieves the number of events in the
mouse-event queue.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
pmouqi     Points to the MOUQUEINFO structure that receives the number of
           events in the mouse-event queue.
 
hmou       Identifies the mouse. This handle must have been created
           previously by using the MouOpen function.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be the following:
 
     ERROR_MOUSE_NO_DEVICE
 
Example
 
This example creates a mouse handle, enables the mouse pointer to be drawn,
and runs within an infinite for loop until there are no events in the
queue.
 
HMOU hmou;
MOUEVENTINFO mouevEvent;
MOUQUEINFO mouqi;
USHORT fWait = FALSE;
MouOpen(0L, &hmou);
MouDrawPtr(hmou);
for (;;) {
    MouGetNumQueEl(&mouqi, hmou);      /* retrieves queue         */
    if (mouqi.cEvents > 1)             /* until the last queue... */
        MouReadEventQue(&mouevEvent, &fWait, hmou);
    else
        break;
}
 
See Also
 
MouFlushQue, MouOpen, MouReadEventQue, MOUQUEINFO