Search code examples
c++windowsconsolepdcurses

Set background color of entire window in PDCurses


wattron and a color pair only sets the background color of text when it is printed inside a window. What is the best way to set the background color of the entire window without filling it with spaces (i.e. a title or status bar)?


Solution

  • A call to wbkgd with a pointer to a WINDOW object and a color pair sets the background color of the window.