en:ibm:prcp:mou:getptrshape

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:ibm:prcp:mou:getptrshape [2016/02/04 05:15] – created valeriusen:ibm:prcp:mou:getptrshape [2016/09/15 04:03] (current) valerius
Line 1: Line 1:
 ==== MouGetPtrShape ==== ==== MouGetPtrShape ====
  
-**Bindings**: C, MASM +**Bindings**: [[getptrshape#bindings|C]][[getptrshape#MASM bindings|MASM]]
  
 This call allows a process to get (copy) the pointer shape for the session.  This call allows a process to get (copy) the pointer shape for the session. 
Line 76: Line 76:
 |505 |ERROR_MOU_EXTENDED_SG | |505 |ERROR_MOU_EXTENDED_SG |
  
-*Remarks** +**Remarks** 
  
 The application passes a parameter list with the same meaning as defined for [[en:ibm:prcp:mou:getptrshape|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 word 0 (buffer length = //TotLength//) pointer definition record parameter field must contain the size in bytes of the application buffer where the device driver is to insert the sessions pointer image. All other words in the parameter list are returned to the application by [[en:ibm:prcp:mou:getptrshape|MouGetPtrShape]].  The application passes a parameter list with the same meaning as defined for [[en:ibm:prcp:mou:getptrshape|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 word 0 (buffer length = //TotLength//) pointer definition record parameter field must contain the size in bytes of the application buffer where the device driver is to insert the sessions pointer image. All other words in the parameter list are returned to the application by [[en:ibm:prcp:mou:getptrshape|MouGetPtrShape]]. 
Line 83: Line 83:
  
 The pointer shape may be set by the application with MouSetPtrShape or may be the default image provided by the installed Pointer Device Driver.  The pointer shape may be set by the application with MouSetPtrShape or may be the default image provided by the installed Pointer Device Driver. 
 +
 +=== C bindings ===
 +
 +<code c>
 +typedef struct _PTRSHAPE {   /* moups */
 +  USHORT cb;                 /* total length necessary to build image */
 +  USHORT col;                /* # of columns in mouse shape */
 +  USHORT row;                /* number of rows in mouse shape */
 +  USHORT colHot;             /* column coordinate of pointer image
 +                                  hotspot */
 +  USHORT rowHot;             /* row coordinate of pointer image
 +                                  hotspot */
 +} PTRSHAPE;
 +
 +#define INCL_MOU
 +
 +USHORT  rc = MouGetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle);
 +
 +PBYTE            PtrBuffer;     /* Pointer shape buffer */
 +PPTRSHAPE        PtrDefRec;     /* Pointer definition struct */
 +HMOU             DeviceHandle;  /* Mouse device handle */
 +
 +USHORT           rc;            /* return code */
 +</code>
 +
 +=== MASM bindings ===
 +
 +<code asm>
 +PTRSHAPE struc
 +  moups_cb      dw  ? ;total length necessary to build image
 +  moups_col     dw  ? ;# of columns in mouse shape
 +  moups_row     dw  ? ;number of rows in mouse shape
 +  moups_colHot  dw  ? ;column coordinate of pointer image hotspot
 +  moups_rowHot  dw  ? ;row coordinate of pointer image hotspot
 +PTRSHAPE ends
 +
 +EXTRN  MouGetPtrShape:FAR
 +INCL_MOU            EQU 1
 +
 +PUSH@  OTHER   PtrBuffer     ;Pointer shape buffer
 +PUSH@  OTHER   PtrDefRec     ;Pointer definition struct
 +PUSH   WORD    DeviceHandle  ;Mouse device handle
 +CALL   MouGetPtrShape
 +
 +Returns WORD
 +</code>