home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / os2sdk / os2sdk10 / apps / ds / help.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-11  |  1.8 KB  |  58 lines

  1. /*  help.c - Show help screen */
  2.  
  3. #include "ds.h"
  4. #include "vars.h"
  5.  
  6.  
  7. char helpScreen[][63] = {
  8.    /* 123456789 123456789 123456789 123456789 123456789 123456789 1 */
  9.     "╔═════════════╦═════════════[ Help ]═════════════╦═══════════╗", /*  0 */
  10.     "║ 21 Aug 1986 ║      Display Subdirectories      ║ Ver 0.030 ║", /*  1 */
  11.     "╠═════════════╩══════════════════════════════════╩═══════════╣", /*  2 */
  12.     "║                        Cursor Keys                         ║", /*  3 */
  13.     "║                                                            ║", /*  4 */
  14.     "║     up - move to upper sibling     left - move to parent   ║", /*  5 */
  15.     "║   down - move to lower sibling    right - move to child    ║", /*  6 */
  16.     "║                                                            ║", /*  7 */
  17.     "║   Shift F1:  Set Colors                                    ║", /*  8 */
  18.     "║         F9:  Exit                                          ║", /*  9 */
  19.     "║      Enter:  Spawn shell at current directory              ║", /* 10 */
  20.     "║                                                            ║", /* 11 */
  21.     "╚═════════════════[ Press any key to return ]════════════════╝"  /* 12 */
  22. };
  23.  
  24. #define     H_WIDTH    62
  25. #define     H_HEIGHT    13
  26.  
  27. int H_ROW;  /* (N_of_Rows - H_HEIGHT)/2 */
  28. int H_COL;  /* (N_of_Cols - H_WIDTH)/2 */
  29.  
  30.  
  31. /***    helpInit - initialize stuff for the help screen
  32. *
  33. *
  34. */
  35. helpInit ()
  36. {
  37.     H_ROW = (N_of_Rows - H_HEIGHT)/2;
  38.     H_COL = (N_of_Cols - H_WIDTH)/2;
  39. }   /* helpInit */
  40.  
  41.  
  42. /***    showHelp - display the help screen
  43. *
  44. *
  45. */
  46. showHelp ()
  47. {
  48.     int row,col;
  49.     Attr a;
  50.  
  51.     a = color[popupC];
  52.  
  53.     for (row=0; row<H_HEIGHT; row++)
  54.     VIOWRTCHARSTRATT (chfs(helpScreen[row]), H_WIDTH, row+H_ROW,H_COL,
  55.               afs(&a), VioHandle);
  56.     getch();                /* Pause */
  57. }   /* showHelp */
  58.