home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c003 / 1.ddi / DEMOS / GRPH_HLP.DOC < prev    next >
Encoding:
Text File  |  1986-11-26  |  2.0 KB  |  49 lines

  1.         DEMONSTRATION OF GRAPHING CAPABILITIES
  2.  
  3.       This program demonstrates the functions supplied with Windows for C
  4.       for drawing bar graphs in text modes.
  5.  
  6.       The cursor controls used in "demo_wn" are available here.  To read
  7.       more of this file, scroll or page the window down.
  8.  
  9.       Four function keys are operative:
  10.  
  11.        F1 places this file in the full-screen window.
  12.  
  13.        F2 draws a vertical bar graph.
  14.  
  15.        F3 draws a horizontal bar graph.
  16.  
  17.        F10 exits.
  18.  
  19.       Source code is supplied on the diskette for this demonstration
  20.       program.
  21.  
  22.       The graphing routine illustrate the versatile, non-obvious ways in
  23.       which window functions can assist software development.  Both the
  24.       axes and bars are drawn by defining windows of the appropriated size
  25.       and location.  The axes and bars are filled with reverse-video spaces.
  26.  
  27.       The window that draws the bars is declared within v_bar().  The bar
  28.       size, location, attribute, and border are supplied as parameters in
  29.       the call.  The bars for the graph are drawn by changing the size and
  30.       location parameters between each call to v_bar().
  31.  
  32.       Vertical text could be written next to the vertical axis by placing a
  33.       window there that is one space wide, with word wrap enabled.  A call
  34.       to v_st() would then automatically write the string in a vertical
  35.       format.  Note that the window would not need to be "set" on the
  36.       screen by set_wn() but simply declared with the proper location and
  37.       dimensions.
  38.  
  39.       This program uses logical attributes.  Attributes LNORMAL and
  40.       LREVERSE are used.  If you wanted to change the colors that this
  41.       program displays on color monitors, you would simply need to change
  42.       the colors defined for these logical attributes and recompile the
  43.       program.
  44.  
  45.       For additional information, refer to the reference text for v_bar(),
  46.       and v_axes(), and the source code for this demonstration program,
  47.       dem_grph.c.
  48.  
  49.