VioGetCurType (FAPI)

From EDM2
Jump to: navigation, search

This call returns the cursor type.

Syntax

VioGetCurType (CursorData, VioHandle)

Parameters

CursorData (PVIOCURSORINFO) - output
Address of the cursor characteristics structure
VioHandle (HVIO) - input
This must be zero unless the caller is a Presentation Manager application, in which case it must be the value returned by VioGetPs.

Return Code

rc (USHORT) - return
Return code descriptions are:
  • 0 NO_ERROR
  • 355 ERROR_VIO_MODE
  • 436 ERROR_VIO_INVALID_HANDLE
  • 465 ERROR_VIO_DETACHED

Remarks

If CursorStartLine and CursorEndLine were originally specified as percentages on VioSetCurType (using negative values), the positive values into which they were translated are returned. Refer to VioSetCurType for more information on how percentages can be used to set CursorStartLine and CursorEndLine independent of the number of scan lines per character cell.

Family API Considerations

In DOS mode, VioGetCurType returns only two values for cursorattrib: 0 = visible cursor, and -1 = hidden cursor.

Bindings

C

typedef struct _VIOCURSORINFO { /* vioci */
  USHORT   yStart;              /* cursor start line */
  USHORT   cEnd;                /* cursor end line */
  USHORT   cx;                  /* cursor width */
  USHORT   attr;                /* -1=hidden cursor, any other=normal cursor */
} VIOCURSORINFO;

#define INCL_VIO

USHORT  rc = VioGetCurType(CursorData, VioHandle);

PVIOCURSORINFO   CursorData;    /* Cursor characteristics */
HVIO             VioHandle;     /* Vio handle */

USHORT           rc;            /* return code */

MASM

VIOCURSORINFO struc
  vioci_yStart dw  ? ;cursor start line
  vioci_cEnd   dw  ? ;cursor end line
  vioci_cx     dw  ? ;cursor width
  vioci_attr   dw  ? ;-1=hidden cursor, any other=normal cursor
VIOCURSORINFO ends

EXTRN  VioGetCurType:FAR
INCL_VIO            EQU 1

PUSH@  OTHER   CursorData    ;Cursor characteristics
PUSH   WORD    VioHandle     ;Vio handle
CALL   VioGetCurType

Returns WORD

Related Functions