|
Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006
Curses problems. Progressive experts #include "Curses.h>
#include "Stdio.h>
WINDOW *winBox;
Main ()
{
Int ch;
Char szTemp[20];
Initscr ();
Cbreak;
Noecho ();
Nonl ();
WinBox = newwin (4, 20, LINES/2-2, COLS/2+5);
While (ch = wgetch (winBox))
{
Mvwaddstr (winBox,1,1, "the first step");
Touchwin (winBox);
Wrefresh (winBox);
Sleep (1);
Mvwaddstr (winBox,1,1, "the second step");
Touchwin (winBox);
Wrefresh (winBox);
Sleep (1);
Mvwaddstr (winBox,1,1, "the thrid step");
Touchwin (winBox);
Wrefresh (winBox);
Sleep (1);
}
Endwin ();
}
After the operation will be the first step but the second step in the middle of the thrid step End shows such as the first step after I push a key and the remaining the second step is not to suggest that the I pressed the tacit consent of the bond that entering a cycle of how to resolve this problem ah, I would like to show the first step in the thrid step the second step in the process, do not accept keyboard input. |
SLEEP function seems to have a trigger signal can only enter the next step, you add the signal processing function to be able to |
Upstairs can be more clearly? This procedure is able to enter the next ah, but winbox not displayed! |
Why did you say no window frame show? ?
B you look at this. Ha ha.
You did not call BOX () function ah.
You operating under enough. .
Ha ha. . . . .
#include "Curses.h>
#include "Stdio.h>
WINDOW *winBox;
Main ()
{
Int ch;
Char szTemp[20];
Initscr ();
Cbreak;
Noecho ();
Nonl ();
WinBox = newwin (4, 20, LINES/2-2, COLS/2+5);
Box (winBox,0,0);
While (ch = wgetch (winBox))
{
Mvwaddstr (winBox,1,1, "the first step");
Touchwin (winBox);
Wrefresh (winBox);
Sleep (1);
Mvwaddstr (winBox,1,1, "the second step");
Touchwin (winBox);
Wrefresh (winBox);
Sleep (1);
Mvwaddstr (winBox,1,1, "the thrid step");
Touchwin (winBox);
Wrefresh (winBox);
Sleep (1);
}
Endwin ();
} |
Babyyellow reply to the message, 4th Floor You do not have to understand, okay, and frame, such as one seconds later and then showed normal show str1 str2. . . . . Strn this is no problem, however, if the show to the middle, knocking the remaining keyboard is not about show, but the procedure or do! And the box no matter! |
I have no problem with my machine, oh. Tap Enter, or will continue to show, such as the one shown, the Press that he will continue to show 2,3, and then show 1,2,3
What you said is meant 吗??
Or, the one shown, after button, there continue to show a 2,3. Directly from the start-1
If it is just this is the problem of the calculation of your cycle. CURSES has no relationship with. ! |
| |