[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible problem with wchgat???
From: |
Cy |
Subject: |
Possible problem with wchgat??? |
Date: |
Tue, 22 Jan 2002 20:35:16 -0600 |
Okay, remember that I'm new to this here cursing (err, curses), so if
I'm wrong here, just tell me so and I'll shut up. b-)
In the sample below, I expected the color of the "A" at 5x5 to change to
YELLOW on RED. Try as I might, I just can't get it to happen. Here's
the example code:
#include <curses.h>
int
main( int argc, char *argv[] )
{
WINDOW *wstat;
initscr();
start_color();
noecho();
init_pair( 1, COLOR_YELLOW, COLOR_BLUE );
init_pair( 2, COLOR_YELLOW, COLOR_RED );
wstat = newwin( 0, 0, 0, 0 );
mvwaddch( wstat, 5, 5, 'A' | A_BOLD | COLOR_PAIR( 1 ) );
mvwaddch( wstat, 9, 9, 'Z' | A_BOLD | COLOR_PAIR( 2 ) );
wrefresh( wstat );
mvwgetch( wstat, 7, 7 );
mvwchgat( wstat, 5, 5, 1, A_BOLD, 2, NULL );
wrefresh( wstat );
mvwgetch( wstat, 7, 7 );
delwin( wstat );
endwin();
return 0;
}
Critter or just me being stupid???
Leland