Jump to content

MouSetDevStatus: Difference between revisions

From EDM2
Created page with "==Description== Sets the mouse device driver status flags for the installed mouse device driver. ==Syntax== <PRE> #define INCL_MOU #include <os2.h> PULONG DeviceStatus; ..."
 
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Description==
Sets the mouse device driver status flags for the installed mouse device driver.
Sets the mouse device driver status flags for the installed mouse device driver.


==Syntax==
==Syntax==
MouSetDevStatus(DeviceStatus, DeviceHandle);
==Parameters==
;DeviceStatus (PULONG) - input : Status flags.
:The passed parameter is a 4-byte set of flags. Only the high byte has meaning.
Bit    Description
31-10  Reserved. Set to 0.
9      If set, mouse data is returned in mickeys, not pels.
8      If set, the drawing operations for pointer draw routine are disabled.
7-0    Reserved. Set to 0.
;DeviceHandle (HMOU) - input : Reserved. Must be 0.
==Return Code==
rc (APIRET) - returns
MouSetDevStatus returns one of the following values:
* 0 NO_ERROR
* 387 ERROR_MOUSE_INV_PARMS
* 466 ERROR_MOU_DETACHED
* 501 ERROR_MOUSE_NO_CONSOLE
==Sample==
<PRE>
<PRE>
#define INCL_MOU
#define INCL_MOU
Line 12: Line 32:


rc = MouSetDevStatus(DeviceStatus, DeviceHandle);
rc = MouSetDevStatus(DeviceStatus, DeviceHandle);
</PRE>
</PRE>
==Parameters==
; DeviceStatus (PULONG) - input : Status flags.
The passed parameter is a 4-byte set of flags. Only the high byte has meaning.
  Bit            Description
31-10        Reserved. Set to 0.
9            If set, mouse data is returned in mickeys, not pels.
8            If set, the drawing operations for pointer draw routine are disabled.
7-0          Reserved. Set to 0.
; DeviceHandle (HMOU) - input : Reserved. Must be 0.
==Return Code==
rc (APIRET) - returns
MouSetDevStatus returns one of the following values:
* 0          NO_ERROR
* 387        ERROR_MOUSE_INV_PARMS
* 466        ERROR_MOU_DETACHED
* 501        ERROR_MOUSE_NO_CONSOLE


==Remarks==
==Remarks==
MouSetDevStatus is the complement to MouGetDevStatus. However, not all status flags can be set with MouSetDevStatus. Only the flags corresponding to the following functions can be modified:
MouSetDevStatus is the complement to MouGetDevStatus. However, not all status flags can be set with MouSetDevStatus. Only the flags corresponding to the following functions can be modified:
 
* Return data in mickeys.
* Return data in mickeys.
Normally, mouse data is returned to the application with the absolute display mode coordinates of the pointer image position on the display screen. When this status flag is set, mouse data is returned in relative mickeys, a unit of mouse movement.  
Normally, mouse data is returned to the application with the absolute display mode coordinates of the pointer image position on the display screen. When this status flag is set, mouse data is returned in relative mickeys, a unit of mouse movement.  
* Don't call pointer draw device.
* Don't call pointer draw device.
Normally, the pointer draw device driver is called for all drawing operations. When this status flag is set, the mouse device driver does not call the pointer draw device driver. The application must draw any required pointer image on the screen.  
Normally, the pointer draw device driver is called for all drawing operations. When this status flag is set, the mouse device driver does not call the pointer draw device driver. The application must draw any required pointer image on the screen.  


At session initialization, the device status is set to 0.  
At session initialization, the device status is set to 0.  


==Example Code==
<PRE>
</PRE>
==Related Functions==
==Related Functions==
*  
*[[MouGetDevStatus]]
 


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

Latest revision as of 15:23, 29 February 2020

Sets the mouse device driver status flags for the installed mouse device driver.

Syntax

MouSetDevStatus(DeviceStatus, DeviceHandle);

Parameters

DeviceStatus (PULONG) - input
Status flags.
The passed parameter is a 4-byte set of flags. Only the high byte has meaning.
Bit     Description
31-10   Reserved. Set to 0.
9       If set, mouse data is returned in mickeys, not pels.
8       If set, the drawing operations for pointer draw routine are disabled.
7-0     Reserved. Set to 0.
DeviceHandle (HMOU) - input
Reserved. Must be 0.

Return Code

rc (APIRET) - returns

MouSetDevStatus returns one of the following values:

  • 0 NO_ERROR
  • 387 ERROR_MOUSE_INV_PARMS
  • 466 ERROR_MOU_DETACHED
  • 501 ERROR_MOUSE_NO_CONSOLE

Sample

#define INCL_MOU
#include <os2.h>

PULONG    DeviceStatus;  /*  Status flags. */
HMOU      DeviceHandle;  /*  Reserved.  Must be 0. */
APIRET    rc;            /*  Return code. */

rc = MouSetDevStatus(DeviceStatus, DeviceHandle);

Remarks

MouSetDevStatus is the complement to MouGetDevStatus. However, not all status flags can be set with MouSetDevStatus. Only the flags corresponding to the following functions can be modified:

  • Return data in mickeys.

Normally, mouse data is returned to the application with the absolute display mode coordinates of the pointer image position on the display screen. When this status flag is set, mouse data is returned in relative mickeys, a unit of mouse movement.

  • Don't call pointer draw device.

Normally, the pointer draw device driver is called for all drawing operations. When this status flag is set, the mouse device driver does not call the pointer draw device driver. The application must draw any required pointer image on the screen.

At session initialization, the device status is set to 0.

Related Functions