[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
        Sample program (hello.c)

                #include "windows.h"
                main()
                {
                WINDOWPTR w1;                   /* window handle */
                int batrib;                     /* border atrib */
                int watrib;                     /* window atrib */

                /*
                 * Set attributes:
                 *
                 *      border - blue/white box
                 *      window - white background/black letters
                 *
                */

                  batrib = v_setatr(BLUE,WHITE,0,0);
                  watrib = v_setatr(WHITE,BLACK,0,0);

                /*
                 * Open window at 0,0 - 15 cells wide and 3 cells high
                */

                  w1 = wn_open(0,0,0,15,3,watrib,batrib);
                  if(!w1) exit();

                /*
                 * Print the famous string and wait for key to be struck.
                 * Close window on key strike.. exit.
                */

                  wn_printf(w1,"Hello World...");
                  v_getch();
                  wn_close(w1);
                }

                /* End */

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson