From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: window() function doens't work? Date: Thu, 29 May 1997 15:45:07 -0400 Organization: Cornell University http://www.cornell.edu Sender: asu1 AT cornell DOT edu (Verified) Message-ID: <338DDCC3.17EA@cornell.edu> References: <338db567 DOT 1153765 AT news DOT prestel DOT co DOT uk> Reply-To: asu1 AT cornell DOT edu NNTP-Posting-Host: cu-dialup-0034.cit.cornell.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 45 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Luke Steele wrote: > I'm having some problems with the window() function. When I define a > window, only the first line of text within it appears within the > window's x limits -- subsequent lines of text appear at the far left > of the screen as if the window function hadn't been called. Any ideas > as to the problem? i do not really understand what your problem is ... a couple of lines to illustrate the problem would have been nice. that said, take a look at the following, maybe it will help: #include int main(void) { clrscr(); window(5,5,40,10); cputs("this is some simple test string to be printed.\n\r"); cputs("this is another simple test string to be printed.\n\r"); getch(); textbackground(BLUE); clrscr(); cputs("and if the amount of text overflows the window boundaries, "); cputs("it will automatically scroll.\n\r"); getch(); cputs("\n\n\n\n\n\rThere you go..."); return 0; } on second thought, it is probably because you terminate the strings with \n only rather than \n\r ... i am not sure why the conio functions were implemented this way, but i have gotten used to it. -- Sinan ******************************************************************* A. Sinan Unur WWWWWW |--O+O mailto:sinan DOT unur AT cornell DOT edu C ^ http://www.people.cornell.edu/pages/asu1/ \ ~/ Unsolicited e-mail is _not_ welcome, and will be billed for. *******************************************************************