From EDM2
Jump to: navigation, search

Gets the pointer shape for the session.


MouGetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle)


PtrBuffer (PVOID) - output 
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) - in/out 
Pointer definition structure.
Contains information about the pointer shape.
DeviceHandle (HMOU) - input 
Reserved. Must be 0.

Return Code

rc (APIRET) - return
MouGetPtrShape returns one of the following values:
  • 0 NO_ERROR


The application passes a parameter list with the same meaning as defined for MouSetPtrShape to the mouse device driver. The mouse device driver copies the parameters that describe the pointer shape and attributes into the pointer definition control block pointed to by the PtrDefRec parameter. The cb field must contain the size in bytes of the application buffer where the device driver is to insert the sessions pointer image. All other fields are returned to the application by MouGetPtrShape.

If the buffer size is insufficient, the cb field contains the actual size in bytes of the returned pointer image.

The pointer shape may be set by the application with MouSetPtrShape or may be the default image provided by the installed Pointer Device Driver.


#define INCL_MOU
#include <os2.h>

PVOID        PtrBuffer;     /*  Pointer shape buffer. */
PPTRSHAPE    PtrDefRec;     /*  Pointer definition structure. */
HMOU         DeviceHandle;  /*  Reserved.  Must be 0. */
APIRET       rc;            /*  Return code. */

rc = MouGetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle);

Related Functions