Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>disp_setcursortype</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
disp_setcursortype

Usage

   #include <disp.h>
   void disp_setcursortype(int startline*256 + endline);

Description

   disp_setcursortype can be used to modify the appearance of the hardware
   cursor. The cursor consists of a series of horizontal lines corresponding
   to the lines of horizontal pixels in the character matrix. The monochrome
   and color systems have different size character matrices. There are also
   differences between the various color display adaptors. In the latter
   case, however, an internal compensation is carried out which allows all
   color adaptors to be specified using an 8x8 matrix. Monochrome systems
   use a 14x9 matrix. A BIOS call is used to set the cursor size, arguments
   expected are the starting and ending lines for the cursor.

   The DOS default cursor types are:


       Type        Start   End     Use
       ----------  -----   ---     -------------
       Monochrome   11     12      ((11*256)+12)
       Color         6      7      ((6*256)+7)

   There are three values defined in disp.h which can be used to set
   standard cursor types:

       DISP_CURSORBLOCK    a full bock cursor
       DISP_CURSORHALF     a half block cursor
       DISP_CURSORUL       an underline cursor

Example 

   #include <conio.h>
   #include <disp.h>
   #include <stdlib.h>

   int main()

   {
       disp_open();
       disp_move(0,0);
       disp_eeop();
       disp_printf("Press any key for a block cursor\n");
       disp_flush();
       getch();
       disp_setcursortype(DISP_CURSORBLOCK);
       disp_printf("Press any key for a half cursor\n");
       disp_flush();
       getch();
       disp_setcursortype(DISP_CURSORHALF);
       disp_printf("Press any key to exit");
       disp_flush();
       getch();
       disp_close();
       return EXIT_SUCCESS;
   }

See Also


   Display package, disp_hidecursor, disp_showcursor, disp_flush



Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson