我创建了两个 Ncurses 窗口:窗口 1 和窗口 2。我可以在调用窗口 2 之前写入窗口 1;但是,在调用 Window 2 之后,我无法使用 mvwprinw(window1, "Bla") 写入 Window 1。为了显示:
...
initscr();
Window* window1 = newwin(10,10,0,0);
mvwprinw(window1, "i am writing to window"); // this works
wrefresh(window1);
Window* window2 = newwin(10,10, 12, 12);
mvwprintw(window2, "whee"); //works too
wrefresh(window2);
mvwprintw(window1, 0,0,"writing new sentence");
// this does not show on the screen
wrefresh(window1);
...
为什么呢?