ncurses, windows, and colors

This is a discussion on ncurses, windows, and colors within the Linux Programming forums, part of the Platform Specific Boards category; I had a few questions about ncurses and how it handles windows and colors. I was practicing programming using the ...

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    34

    ncurses, windows, and colors

    I had a few questions about ncurses and how it handles windows and colors.

    I was practicing programming using the ncurses and I can't figure out a few things.

    My first problem is when I make a new window and than I try to print something to the stdscr, the window I made looses it's borders. Why is that?

    Second problem is I don't really understand colors and when you're supposed to refresh and to what window. If you do something like this:

    Code:
    init_pair(1, COLOR_BLUE, COLOR_BLACK);
    attron(COLOR_PAIR(1);
    and you don't have a window you get a black background and a blue foreground. But when I made a window the only thing that had a black background was the window border and the text in the window also had a black background and a blue forground. I'm guessing this is because I'm not refreshing right?
    ~flood

  2. #2
    Obsessed with C chrismiceli's Avatar
    Join Date
    Jan 2003
    Posts
    501
    I haven't really messed with curses, but what tutorial are you using? This one is quite lengthy and I have been meaning to read it, hope it helps:http://en.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
    Help populate a c/c++ help irc channel
    server: irc://irc.efnet.net
    channel: #c

  3. #3
    Registered User
    Join Date
    Aug 2004
    Posts
    34
    thats the one i'm learning from
    ~flood

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 05-13-2007, 08:55 AM
  2. I need to make a 256 colors palette just like the one Windows uses
    By manugarciac in forum Windows Programming
    Replies: 4
    Last Post: 04-30-2007, 01:42 AM
  3. Windows background color
    By Exile in forum Windows Programming
    Replies: 2
    Last Post: 01-23-2005, 06:55 AM
  4. bitmap in windows
    By samudrala_99 in forum Windows Programming
    Replies: 2
    Last Post: 10-03-2002, 12:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21