![]() |
| | #1 |
| Registered User Join Date: Jul 2007
Posts: 62
| ncurses window problem If someone wants, here's a simple example program. Code: #include <ncurses.h>
int main(void) {
WINDOW *wp;
initscr();
wp = newwin(10, 10, 10, 10);
box(wp, 0, 0);
wprintw(wp, "foo");
wrefresh(wp);
endwin();
return 0;
}
|
| fronty is offline | |
| | #2 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| Well, there's nothing in your program that prevents it from exiting as soon as it's finished showing the window... So I expect it will flash up a window for brief moment and then take it down again. Try putting a "getchar()" before your return in main(). -- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. |
| matsp is offline | |
| | #3 |
| Registered User Join Date: Jul 2007
Posts: 62
| Sorry, forgot it from that program. I've used it, but it doesn't work. And a littele more specifing, I _can_ see text written in window, but I _can't_ see windows borders. |
| fronty is offline | |
| | #4 |
| Registered User Join Date: Jul 2007
Posts: 62
| Okay. Got it working. First I noticed, that if I put getch(); after calling box() in function that I made to create windows and put frames in it, it showed borders. After that I noticed, that if I replaced that getch(); with refresh();, same thing happened and I didn't have to press any key. Looks like this problem is pretty much solved. |
| fronty is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A question related to strcmp | meili100 | C++ Programming | 6 | 07-07-2007 02:51 PM |
| OpenGL Window | Morgul | Game Programming | 1 | 05-15-2005 12:34 PM |
| problem with open gl engine. | gell10 | Game Programming | 1 | 08-21-2003 04:10 AM |
| Tab Controls - API | -KEN- | Windows Programming | 7 | 06-02-2002 09:44 AM |
| Winamp Vis if anyone can help | Unregistered | Windows Programming | 6 | 01-27-2002 12:43 AM |