home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / tools / help / pvhc / pvhctry.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-19  |  1.6 KB  |  49 lines

  1. /* **************************************************************
  2. ****  pvhctry.c - example program demonstrating how to run    ***
  3. ****              PolyVision Help System                      ***
  4. ****  Link in large mode with PVHCL.LIB
  5. ****  (C)1994 PolyVision SoftWare                             ***
  6. ************************************************************** */
  7.  
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10.  
  11.  
  12. /* include the PolyVision Help File header */
  13. #include "pvhc.h"
  14. /* if you ran PHC with the -h option,    */
  15. /* you could place that header here also */
  16.  
  17.  
  18. char far *HelpErrors[] = {
  19. "Could not open help file. . .",
  20. "Help file not PVHC type. . .",
  21. "Could not allocate help buffers. . ."
  22. };
  23.  
  24. void main(void)
  25. {
  26. int i;
  27.  
  28. /* Assign color scheme to use - see header file */
  29. HelpWindClr = BLUECYAN;      /* blue over cyan      */
  30. HelpBoldClr = HIWHITECYAN;   /* white over cyan     */
  31. HelpBordClr = REDWHITE;      /* red over light gray */
  32. HelpGlosClr = BLACKCYAN;     /* black over cyan     */
  33. HelpRefClr  = YELLOWCYAN;    /* yellow over cyan    */
  34.  
  35. /* Use your help file name or setup.hlp for demonstration */
  36. if((i = initPVHelp("setup.hlp")) < 0)  /* initialize the system */
  37.    {
  38.    printf("%s\n", HelpErrors[~i]);    /* inform user no go */
  39.    exit(0);                           /* exit program      */
  40.    }
  41.  
  42. getHelpPage(2); /* requests help page 2  */
  43.  
  44. DestroyPVHelp(); /* close down the help system */
  45. showcursor();    /* show the text cursor       */
  46. printf("That's all there is to it!\nPLEASE REGISTER!!\n");
  47. return;
  48. }  /* End of program */
  49.