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; ..."
 
Ak120 (talk | contribs)
mNo edit summary
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.


Line 12: Line 11:


rc = MouSetDevStatus(DeviceStatus, DeviceHandle);
rc = MouSetDevStatus(DeviceStatus, DeviceHandle);
</PRE>


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


; DeviceHandle (HMOU) - input : Reserved. Must be 0.
==Return Code==
==Return Code==
  rc (APIRET) - returns
  rc (APIRET) - returns
MouSetDevStatus returns one of the following values:
MouSetDevStatus returns one of the following values:
 
* 0 NO_ERROR
* 0         NO_ERROR
* 387 ERROR_MOUSE_INV_PARMS  
* 387       ERROR_MOUSE_INV_PARMS  
* 466 ERROR_MOU_DETACHED  
* 466       ERROR_MOU_DETACHED  
* 501 ERROR_MOUSE_NO_CONSOLE  
* 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]]

Revision as of 23:01, 23 December 2016

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

Syntax

#define INCL_MOU
#include <os2.h>

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

rc = 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

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