home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / vidhandl / setpage.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-03  |  768 b   |  33 lines

  1. //Simple program that selects the active display page
  2. //by Marcio A. A. Fialho
  3.  
  4. #include <crt.h>
  5. #include <stdio.h>
  6. #include <ctype.h>
  7.  
  8. #include "hextoi.c"
  9.   //hextoi defined in HEXTOI.C converts a string in hexadecimal notation to a integer
  10.  
  11. void main (int n, char *ent[2])
  12.  {
  13.     int a0; //a0 = mode
  14.     if (n<2)
  15.      {
  16.         fputs("\n\
  17. SETPAGE ver 1.0 - Selects video active display page\n\n\
  18. \tUsage: SETPAGE <pagenum> \n\n\
  19. \t<pagenum> => new video page (must be in hexadecimal notation)\n\n\
  20. by Márcio Afonso Arimura Fialho\n\
  21. Freeware / Public Domain",stdout);
  22.         return;
  23.      }
  24.  
  25.     if (hextoi(&a0,ent[1]))
  26.      {
  27.         fputs("ERROR:Input parameter is incorrect.\n\
  28. Type SETPAGE with no parameters to get help",stdout);
  29.         return;
  30.      }
  31.     setcrtpage (a0);
  32.  }
  33.