I found the solution myself: refresh win after stdscr.
I would like to have a white window in a blue screen, and I tried it with the following code:
initscr();
WINDOW *win = newwin(10, 10, 10, 10);
start_color();
init_pair(1, COLOR_BLACK, COLOR_BLUE);
init_pair(2, COLOR_BLACK, COLOR_WHITE);
wbkgd(stdscr, COLOR_PAIR(1));
wbkgd(win, COLOR_PAIR(2));
wrefresh(win);
refresh();
But I only get a completly blue screen. What is wrong?
Thanks for all help!
Solution: Refresh the window after
stdscr:instead of: