Mail Archives: djgpp/2002/08/24/05:29:27
Hi,
I am trying to use Pdcurses lib , I got it at www.delorie.com. But
I am facing few problems.
Especially the colour routines.Like the example given below, when
I compile /link it , everything goes smoothly.When there is no
output.Basically a blank dos box starts and nothing happens, just
waits for the getch() and exits when I press a key. Where am I wrong,
is there something with this code.Well I tried the colour routines
myself without much success then I got this example on some website,
but still the problem.
Please look into it.If somebody can provide example/snippets of
programs with the ncurses/pdcurses lib I will be cool.
Thanx in advance, appretiate it!
Regards
Pradeepto
/**************The code***********************************/
#include <stdio.h>
#include <curses.h>
int main()
{
WINDOW *vin;
init_scr();
start_color();
init_pair(1,COLOR_YELLOW,COLOR_BLUE);
init_pair(2,COLOR_BLUE,COLOR_YELLOW);
init_pair(3,COLOR_BLUE,COLOR_WHITE);
vin=newwin(12,40,13,0);
wmove(vin,0,5);
wprintw(vin,"Hello, World.");
wbkgd(vin,COLOR_PAIR(1));
wrefresh(vin);
getch();
delwin(vin);
endwin();
return 0;
}
- Raw text -