MouRemovePtr: Difference between revisions
m Ak120 moved page OS2 API:CPI:MouRemovePtr to MouRemovePtr |
mNo edit summary |
||
Line 6: | Line 6: | ||
#include <os2.h> | #include <os2.h> | ||
PNOPTRRECT PtrArea; /* | PNOPTRRECT PtrArea; /* Pointer shape collision area. */ | ||
HMOU DeviceHandle; /* | HMOU DeviceHandle; /* Reserved. Must be 0. */ | ||
APIRET rc; /* | APIRET rc; /* Return code. */ | ||
rc = MouRemovePtr(PtrArea, DeviceHandle); | rc = MouRemovePtr(PtrArea, DeviceHandle); | ||
Line 19: | Line 19: | ||
==Return Code== | ==Return Code== | ||
;rc (APIRET) - returns:MouRemovePtr returns one of the following values: | |||
MouRemovePtr 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 | ||
Revision as of 17:29, 14 September 2019
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
#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);
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
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.