bbc Subj : Multiple size text To : borland.public.cpp.borlandcpp From : "Rob C." Date : Tue Jul 29 2003 04:42 pm I’ve written a multiple size text program base upon the \BC5 \BGI\bgidemo.c program. It writes the title in giant letters across the top of the screen (graphics-mode), and then passes to color1.c which runs the rest of the program in text-mode. Except the computer is still in graphics-mode. So my question is, how can I close graphics-mode and startt up text-mode without the computer clearing the screen ( It always did this in PowerC for DOS). color1.c is defined as extern "C" void color1(void); in bgidemo.c Target = Application Platform = DOS standard BGI is checked --------- fragment of BC5\BGI\bgidemo.c void SayGoodbye(void) { struct viewporttype viewinfo; /* Structure to read viewport */ int h, w, color=7; THIS I DON’T NEED, DO I? //MainWindow( "== Finale ==" ); setfillstyle( SOLID_FILL, color ); /* Set the color of box */ setcolor( color ); /* Set the same border clor */ getviewsettings( &viewinfo ); //Read viewport settings changetextstyle( GOTHIC_FONT, HORIZ_DIR, 6 ); settextjustify( CENTER_TEXT, LEFT_TEXT ); h = viewinfo.bottom - viewinfo.top; w = viewinfo.right - viewinfo.left; cprintf( w/2, 40, "Moclips Beach Association" ); //w/3, h/3, //getviewsettings( &viewinfo ); //+++Read viewport settings setcolor( color ); //Set the same border color changetextstyle( TRIPLEX_FONT, HORIZ_DIR, 1 ); settextjustify( CENTER_TEXT, LEFT_TEXT ); h = viewinfo.bottom - viewinfo.top; w = viewinfo.right - viewinfo.left; cprintf( w/2, 65, "[F1 for help]" ); //StatusLine( "Press any key to EXIT" ); HERE I WANT TO CLOSE GRAPHICS-MODE AND START TEXT-MODE, BUT NOT CLEAR THE SCREEN //cleardevice(); /* Clear the graphics screen */ } ---------------- color1.c #include #include //Application, DOS standard, BGI void color1(void) { //89 int col, row, startrow, startcol, endrow, endcol; char Hbar[3], Vbar[3], ULcor[3], URcor[3], LLcor[3], LRcor[3]; Hbar[0] = (char) 0xC4; /* HORIZONTAL single border ! */ Hbar[1] = '\0'; Vbar[0] = (char) 0xB3; /* verticle single border */ Vbar[1] = '\0'; ULcor[0] = (char) 0xDA; /* upper-left single corner */ ULcor[1] = '\0'; URcor[0] = (char) 0xBF; /* upper-right single corner */ URcor[1] = '\0'; LLcor[0] = (char) 0xC0; /* lower-left single corner */ LLcor[1] = '\0'; LRcor[0] = (char) 0xD9; /* lower-right single corner */ LRcor[1] = '\0'; row= startrow= 6; col= startcol= 1; endrow= 24; endcol= 77; textcolor(1); textbackground(1); window( startcol, startrow, endcol, endrow); clrscr(); textcolor(7); textbackground(7); cprintf( Vbar ); cprintf(Vbar ); cprintf(Vbar ); cprintf(Vbar ); cprintf(Vbar ); getch(); return(0); } //89 . 0