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.
MouGetNumButtons (1.2)
Overview                                            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_MOU
 
USHORT MouGetNumButtons(pusButtons, hmou)
PUSHORT pusButtons;    /* address of variable for number of mouse buttons */
HMOU hmou;             /* mouse handle                                    */
 
The MouGetNumButtons function retrieves the number of buttons on the current
mouse.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
pusButtons  Points to the variable that receives the number of buttons on
            the mouse.
 
hmou        Identifies the mouse. The 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 then calls the MouGetNumButtons function
to retrieve the number of mouse buttons:
 
HMOU hmou;
USHORT usButtons;
MouOpen(0L, &hmou);
MouGetNumButtons(&usButtons, hmou);
if(usButtons == 2)
    VioWrtTTY("Your mouse has two buttons\n\r", 28, 0);
 
See Also
 
MouOpen