Nofew icon

CursesWhatTheHeck

Nofew | PRO | 05/23/16 11:49:58 PM UTC | 0 ⭐ | 341 👁️ | Never ⏰ | []
C |

760 B

|

None

|

0 👍

/

0 👎

#include <curses.h>
 
int main(void) {
    int i;
    int KeyPressed;
    system("mode 100, 50");
    initscr(); // Here we go!
    raw();
    nonl();
    noecho();
    keypad(stdscr, TRUE);
    curs_set(2);
    WINDOW *Wind;
 
    for(i=0; i<10; i++) {
        move(0, i);
        refresh();
        napms(100);
    }
 
    napms(1000);
 
    // This works fine.
    Wind=newwin(3, 12, 4, 4);
    box(Wind, 0, 0);
    refresh();
    wrefresh(Wind);
 
    // This also works.
    for(i=0; i<10; i++) {
        move(5, 5+i);
        refresh();
        napms(100);
    }
 
    napms(1000);
 
    for(i=0; i<10; i++) {
        wmove(Wind, 1, 1+i);
        wrefresh(Wind);
        napms(100);
    }
 
    napms(1000);
 
    endwin();
    return 0;
}

Comments