Difference between revisions of "MouGetNumButtons"

From EDM2
Jump to: navigation, search
m
Line 1: Line 1:
==Description==
 
 
Returns the number of buttons supported on the installed mouse device driver.
 
Returns the number of buttons supported on the installed mouse device driver.
  
Line 16: Line 15:
 
==Parameters==
 
==Parameters==
 
;  NumberOfButtons (PULONG) - output : Number of mouse buttons.
 
;  NumberOfButtons (PULONG) - output : Number of mouse buttons.
Address where the number of physical buttons is to be returned.
+
:Address where the number of physical buttons is to be returned.
 
+
:The return values for the number of buttons supported are:
The return values for the number of buttons supported are:
+
  Value Definition  
 
+
  1     One mouse button.  
  Value           Definition  
+
  2     Two mouse buttons.  
  1           One mouse button.  
+
  3     Three mouse buttons.  
  2           Two mouse buttons.  
+
  3           Three mouse buttons.  
+
 
+
 
; DeviceHandle (HMOU) - input : Mouse device handle.
 
; DeviceHandle (HMOU) - input : Mouse device handle.
 
Reserved. Set to 0.
 
Reserved. Set to 0.
Line 32: Line 28:
  
 
MouGetNumButtons returns one of the following values:
 
MouGetNumButtons returns one of the following values:
 
 
* 0          NO_ERROR  
 
* 0          NO_ERROR  
 
* 466        ERROR_MOU_DETACHED  
 
* 466        ERROR_MOU_DETACHED  
 
* 501        ERROR_MOUSE_NO_CONSOLE
 
* 501        ERROR_MOUSE_NO_CONSOLE
  
==Remarks==
+
[[Category:Mou]]
 
+
 
+
==Example Code==
+
<PRE>
+
 
+
</PRE>
+
==Related Functions==
+
 
+
 
+
 
+
[[Category:The OS/2 API Project]]
+

Revision as of 05:56, 10 January 2017

Returns the number of buttons supported on the installed mouse device driver.

Syntax

#define INCL_MOU
#include <os2.h>

PULONG    NumberOfButtons;  /*  Number of mouse buttons. */
HMOU      DeviceHandle;     /*  Mouse device handle. */
APIRET    rc;               /*  Return code. */

rc = MouGetNumButtons(NumberOfButtons, DeviceHandle);

Parameters

NumberOfButtons (PULONG) - output 
Number of mouse buttons.
Address where the number of physical buttons is to be returned.
The return values for the number of buttons supported are:
Value  Definition 
1      One mouse button. 
2      Two mouse buttons. 
3      Three mouse buttons. 
DeviceHandle (HMOU) - input 
Mouse device handle.

Reserved. Set to 0.

Return Code

rc (APIRET) - returns

MouGetNumButtons returns one of the following values:

  • 0 NO_ERROR
  • 466 ERROR_MOU_DETACHED
  • 501 ERROR_MOUSE_NO_CONSOLE