#include /* Include header file. */ WINDOW *win1; /* Define windows. */ main() { char str[80]; /* Variable declaration. */ initscr(); /* Set up Curses. */ noecho(); /* Turn off echo. */ /* Create window. */ win1 = newwin(10, 20, 10, 10); box(stdscr, '|', '-'); /* Draw a box around stdscr. */ box(win1, '|', '-'); /* Draw a box around win1. */ refresh(); /* Display stdscr on screen. */ wrefresh(win1); /* Display win1 on screen. */ getstr(str); /* Pause. Type a few words! */ mvaddstr(22, 1, str); getch(); /* Add string to win1. */ mvwaddstr(win1, 5, 5, "Hello"); wrefresh(win1); /* Add win1 to terminal scr. */ getch(); /* Pause. Press Return. */ delwin(win1); /* Delete win1. */ touchwin(stdscr); /* Refresh all of stdscr. */ getch(); /* Pause. Press Return. */ endwin(); /* Ends session. */ }