Jump to content

MouRemovePtr: Difference between revisions

From EDM2
Created page with "==Description== Notifies the mouse device driver that the area defined by the passed parameters is for the exclusive use of the application. This area is defined as the collis..."
 
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Description==
Notifies the mouse device driver that the area defined by the passed parameters is for the exclusive use of the application. This area is defined as the collision area and is not available to the mouse device driver when drawing pointer images.
Notifies the mouse device driver that the area defined by the passed parameters is for the exclusive use of the application. This area is defined as the collision area and is not available to the mouse device driver when drawing pointer images.


==Syntax==
==Syntax==
MouRemovePtr(PtrArea, DeviceHandle);
==Parameters==
;PtrArea (PNOPTRRECT) - input : Pointer shape collision area.
:The address of the pointer shape collision area structure.
;DeviceHandle (HMOU) - input :  Reserved. Must be 0.
==Return Code==
;rc (APIRET) - returns:MouRemovePtr 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
#include <os2.h>
#include <os2.h>


PNOPTRRECT    PtrArea;      /* Pointer shape collision area. */
PNOPTRRECT    PtrArea;      /* Pointer shape collision area. */
HMOU          DeviceHandle;  /* Reserved.  Must be 0. */
HMOU          DeviceHandle;  /* Reserved.  Must be 0. */
APIRET        rc;            /* Return code. */
APIRET        rc;            /* Return code. */


rc = MouRemovePtr(PtrArea, DeviceHandle);
rc = MouRemovePtr(PtrArea, DeviceHandle);
</PRE>
</PRE>
==Parameters==
; PtrArea (PNOPTRRECT) - input : Pointer shape collision area.
The address of the pointer shape collision area structure.
; DeviceHandle (HMOU) - input :  Reserved. Must be 0.
==Return Code==
rc (APIRET) - returns
MouRemovePtr 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==
Line 34: Line 33:
If the logical pointer position is outside of the collision area specified by the latest MouRemovePtr call, the pointer image is drawn.
If the logical pointer position is outside of the collision area specified by the latest MouRemovePtr call, the pointer image is drawn.


The A MouDrawPtr call effectively cancels a MouRemovePtr call, allowing the pointer to be drawn anywhere on the screen until the next MouRemovePtr call is issued.  
The [[MouDrawPtr]] call effectively cancels a MouRemovePtr call, allowing the pointer to be drawn anywhere on the screen until the next MouRemovePtr call is issued.  
 
==Example Code==
<PRE>
 
</PRE>
==Related Functions==
*
 


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

Latest revision as of 15:24, 29 February 2020

Notifies the mouse device driver that the area defined by the passed parameters is for the exclusive use of the application. This area is defined as the collision area and is not available to the mouse device driver when drawing pointer images.

Syntax

MouRemovePtr(PtrArea, DeviceHandle);

Parameters

PtrArea (PNOPTRRECT) - input
Pointer shape collision area.
The address of the pointer shape collision area structure.
DeviceHandle (HMOU) - input
Reserved. Must be 0.

Return Code

rc (APIRET) - returns
MouRemovePtr 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>

PNOPTRRECT    PtrArea;       /* Pointer shape collision area. */
HMOU          DeviceHandle;  /* Reserved.  Must be 0. */
APIRET        rc;            /* Return code. */

rc = MouRemovePtr(PtrArea, DeviceHandle);

Remarks

MouRemovePtr can be issued by any process in the session. However, only one collision area at a time is active. Each call to MouRemovePtr has the effect of resetting the collision area to the location and area specified by the current call.

If the logical pointer position is outside of the collision area specified by the latest MouRemovePtr call, the pointer image is drawn.

The MouDrawPtr call effectively cancels a MouRemovePtr call, allowing the pointer to be drawn anywhere on the screen until the next MouRemovePtr call is issued.