win = newwin( 24, 80, /* lines, cols */
0, 0 ); /* begin X, begin Y */
keypad( win, TRUE ); /* important */
intrflush(win,FALSE);
nodelay( win, FALSE );
wattrset( win, A_NORMAL );
wborder( win,ACS_VLINE, /* left sider line */
ACS_VLINE, /* right side line */
ACS_HLINE, /* top side line */
ACS_HLINE, /* bottom side line */
ACS_ULCORNER, /* top-left hande corner */
ACS_URCORNER, /* top-right hand corner */
ACS_LLCORNER, /* bottom-left hand corner */
ACS_LRCORNER);
touchwin( win );
wrefresh( win );
getch();
clear();
endwin();
}
在LINUX下编译: gcc -o a a.c -lcurses
环境: export TERM=ansi