Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!usc!apple!vsi1!teraida!teda!jeffy From: jeffy@teda.UUCP (Jeffrey Youngstrom) Newsgroups: comp.lang.c Subject: A different curses question Summary: overlay() == overwrite() :-( Message-ID: <45@teda.UUCP> Date: 15 Jan 90 23:26:02 GMT Reply-To: jeffy@teraida.UUCP (Jeffrey Youngstrom) Distribution: na Organization: Teradyne EDA Inc., Santa Clara, Ca. Lines: 48 On my Sun 3/80 SunOS 4.0.3 in case it matters, I'm having trouble with the overlay() function. Namely it seems to do the same thing as overwrite() (replaces the contents of it's second arg by the contents of its first.) Here's some code: #include main() { WINDOW *win1, *win2; char c; initscr(); crmode(); win1=newwin(LINES, COLS, 0, 0); win2=newwin(LINES, COLS, 0, 0); wmove(win1, 10, 10) ; waddstr(win1, "this is window number one"); wmove(win2, 20, 20) ; waddstr(win2, "this is window number two"); wrefresh(win1); /* show win one */ c=getchar();clear();refresh(); wrefresh(win2); /* show win two */ c=getchar();clear();refresh(); overlay(win1, win2); /* overlay */ wrefresh(win2); /* unfortunately, when it shows win2 here, it looks just like win1 did before :-( */ c=getchar();clear();refresh(); endwin(); return; } TFM wasn't helpful. I would appreciate any emailed suggestions! AtDhVaAnNkCsE!!! jeffy Curses...foiled again! -- ...!{decwrl,sun}!teraida!jeffy or jeffy@altair.csustan.edu Read it in the books in the crannies and the nooks there are books to read