Nofew icon

CursesThing

Nofew | PRO | 05/24/16 12:14:52 AM UTC | 0 ⭐ | 310 👁️ | Never ⏰ | []
C |

710 B

|

None

|

0 👍

/

0 👎

#include <curses.h>
 
int main(void) {
    int KeyPressed;
    system("mode 100, 50");
    initscr(); // Here we go!
    raw();
    nonl();
    noecho();
    keypad(stdscr, TRUE);
    curs_set(2);
    WINDOW *Wind;
 
    // This works fine.
    Wind=newwin(3, 10, 4, 4);
    box(Wind, 0, 0);
    wnoutrefresh(Wind);
    wrefresh(Wind);
    doupdate();
 
    // This also works.
    KeyPressed = getch();
    move(5, 12);
    wnoutrefresh(Wind);
    wrefresh(Wind);
    doupdate();
 
    // This does not appear to move the cursor.
    KeyPressed = getch();
    wmove(Wind, 1, 1);
    wnoutrefresh(Wind);
    wrefresh(Wind);
    doupdate();
 
    KeyPressed = getch();
    endwin();
    return 0;
}

Comments