MouSetPtrShape: Difference between revisions
Appearance
m Ak120 moved page OS2 API:CPI:MouSetPtrShape to MouSetPtrShape |
mNo edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
==Syntax== | ==Syntax== | ||
MouSetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle) | |||
==Parameters== | ==Parameters== | ||
;PtrBuffer (PBYTE) - input : Pointer-shape buffer. | ;PtrBuffer ([[PBYTE]]) - input: Pointer-shape buffer. | ||
:Address of a buffer containing the bit image used as the pointer shape for the session. The buffer consists of AND and XOR pointer masks. | :Address of a buffer containing the bit image used as the pointer shape for the session. The buffer consists of AND and XOR pointer masks. | ||
:For CGA-compatible text modes (0, 1, 2, and 3) the following describes the AND and XOR pointer mask bit definitions for each character cell of the masks. Bit values are: | |||
For CGA-compatible text modes (0, 1, 2, and 3) the following describes the AND and XOR pointer mask bit definitions for each character cell of the masks. Bit values are | ::15 - Blinking | ||
::14-12 - Background color | |||
::11 - Instensity | |||
::10-8 - Foreground color | |||
::7-0 - Character | |||
;PtrDefRec (PPTRSHAPE) - input: Pointer definition record. | |||
;PtrDefRec (PPTRSHAPE) - input : Pointer definition record. | |||
:Address of the structure where the application stores the necessary data for the pointer draw device driver to build a row-by-column image for each bit plane for the current display mode. | :Address of the structure where the application stores the necessary data for the pointer draw device driver to build a row-by-column image for each bit plane for the current display mode. | ||
; DeviceHandle (HMOU) - input : Reserved. Must be 0. | ;DeviceHandle (HMOU) - input: Reserved. Must be 0. | ||
==Return Code== | ==Return Code== | ||
;rc (APIRET) - return:MouSetPtrShape returns one of the following values: | |||
MouSetPtrShape 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 | ||
==Sample== | |||
<PRE> | |||
#define INCL_MOU | |||
#include <os2.h> | |||
PBYTE PtrBuffer; /* Pointer-shape buffer. */ | |||
PPTRSHAPE PtrDefRec; /* Pointer definition record. */ | |||
HMOU DeviceHandle; /* Reserved. Must be 0. */ | |||
APIRET rc; /* Return code. */ | |||
rc = MouSetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle); | |||
</PRE> | |||
==Related Functions== | ==Related Functions== |
Latest revision as of 22:47, 28 July 2018
Sets the pointer shape and size to be used as the mouse device driver pointer image for all applications in a session.
Syntax
MouSetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle)
Parameters
- PtrBuffer (PBYTE) - input
- Pointer-shape buffer.
- Address of a buffer containing the bit image used as the pointer shape for the session. The buffer consists of AND and XOR pointer masks.
- For CGA-compatible text modes (0, 1, 2, and 3) the following describes the AND and XOR pointer mask bit definitions for each character cell of the masks. Bit values are:
- 15 - Blinking
- 14-12 - Background color
- 11 - Instensity
- 10-8 - Foreground color
- 7-0 - Character
- PtrDefRec (PPTRSHAPE) - input
- Pointer definition record.
- Address of the structure where the application stores the necessary data for the pointer draw device driver to build a row-by-column image for each bit plane for the current display mode.
- DeviceHandle (HMOU) - input
- Reserved. Must be 0.
Return Code
- rc (APIRET) - return
- MouSetPtrShape 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> PBYTE PtrBuffer; /* Pointer-shape buffer. */ PPTRSHAPE PtrDefRec; /* Pointer definition record. */ HMOU DeviceHandle; /* Reserved. Must be 0. */ APIRET rc; /* Return code. */ rc = MouSetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle);