subcalls.hlp (Topic list)
VioSetCurType (1.2)
Overview  Changes                                 Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioSetCurType(pvioci, hvio)
PVIOCURSORINFO pvioci; /* pointer to structure for cursor characteristics */
HVIO hvio;             /* video handle                                    */
 
The VioSetCurType function sets the cursor type. The cursor is a shared
resource for all processes in a screen group. If one process changes it, it
is changed for all processes in the group.
 
The VioSetCurType function is a family API function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
pvioci     Points to the VIOCURSORINFO structure that specifies the
           characteristics of the cursor.
 
hvio       Identifies an advanced video-input-and-output (AVIO) presentation
           space. For AVIO programs, this handle must have been created
           previously by using the VioCreatePS function. For other programs,
           hvio must be NULL.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
    ERROR_VIO_INVALID_HANDLE
    ERROR_VIO_WIDTH
 
Comments
 
The yStart and cEnd fields of the VIOCURSORINFO structure can be set to
values that are independent of the number of scan lines in the character
cell. If you specify percentages for these values, MS OS/2 calculates the
beginning and ending scan lines by multiplying the specified percentage by
the number of scan lines in the character cell and rounding the total to the
nearest scan line. Percentages are specified as a number in the range 0
through -100. For example, if yStart is set to -90 and cEnd is set to -100,
the cursor occupies the bottom 10 percent of the character cell.
 
Example
 
This example calls the VioSetCurType function to set the current cursor type
to a block cursor with 14 scan lines.
 
VIOCURSORINFO vioci;
vioci.yStart = 0;      /* beginning scan line for cursor */
vioci.cEnd = 13;       /* ending scan line, zero-based   */
vioci.cx = 0;          /* default width, one character   */
vioci.attr = 0;        /* normal attribute               */
VioSetCurType(&vioci, 0);
 
See Also
 
VioCreatePS, VioGetCurType, VioSetCurPos, VIOCURSORINFO