[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Possible problem with wchgat???
From: |
Cy |
Subject: |
RE: Possible problem with wchgat??? |
Date: |
Tue, 22 Jan 2002 21:13:00 -0600 |
I should mention that this is with the corrected mvwchgat define.
(replace stdscr with win)
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of Cy
> Sent: Tuesday, January 22, 2002 8:35 PM
> To: address@hidden
> Subject: Possible problem with wchgat???
>
>
> 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
>
>
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden http://mail.gnu.org/mailman/listinfo/bug-ncurses
>