about ncurses and screen dumping - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

about ncurses and screen dumping

fnoyanfnoyan Posts: 103Member
Hi
I have a code like below :
"ch" is type of char and 113 is ESC. MessageBox function simply displays a message box asking the user to continue the process.Messagebox returns 1 if the answer is "yes" and 0 if the answer is "no". But I want to dump the screen before displaying the message box and redraw it if the answer is no. But it doesn't redraw the screen!...Please check..

*screen_dump="/tmp/screen.tmp";

switch(ch)
{
case 113:
{
scr_dump(screen_dump);
ans=MessageBox();
if (ans)
{
system("/bin/rm -f /tmp/screen.tmp");
goto dbm_exit;
}
else
{
scr_restore(screen_dump);
break;
}
}
break;
case 104:
action_win(14,body_sub);
break;
}

Thanks....

Sign In or Register to comment.