Jump to content

MouGetNumButtons: Difference between revisions

From EDM2
Created page with "==Description== Returns the number of buttons supported on the installed mouse device driver. ==Syntax== <PRE> #define INCL_MOU #include <os2.h> PULONG NumberOfButtons; ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
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.


==Syntax==
==Syntax==
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:
::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
==Sample==
<PRE>
<PRE>
#define INCL_MOU
#define INCL_MOU
Line 12: Line 30:


rc = MouGetNumButtons(NumberOfButtons, DeviceHandle);
rc = MouGetNumButtons(NumberOfButtons, DeviceHandle);
</PRE>
==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
==Remarks==
==Example Code==
<PRE>
</PRE>
</PRE>
==Related Functions==


[[Category:The OS/2 API Project]]
[[Category:Mou]]

Latest revision as of 22:33, 7 December 2022

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

Syntax

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:
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

Sample

#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);