/* ------------------------------------------------------------- utf8_box.c 2026 by Horst Schlindwein ------------------------------------------------------------- */ #include "utf8textmode.c" void boxoutwhead(unsigned char x, unsigned char y, unsigned char xlen, unsigned char ylen, unsigned char bordercolor, unsigned char fieldcolor) { int xb,yb; settextattr(fieldcolor); for (yb= y; yb< y+ylen; yb++) { gotoxy(x, yb); for (xb= x; xb< x+xlen; xb++) { printf(" "); } } // obere doppelte Linie settextattr(bordercolor); gotoxy(x+1,y); for (xb= 0; xb< xlen-2; xb++) { printf("%c",205); } // innere doppelte Linie gotoxy(x+1,y+2); for (xb= 0; xb< xlen-2; xb++) { printf("%c",205); } // untere doppelte Linie gotoxy(x+1,y+ylen-1); for (xb= 0; xb< xlen-2; xb++) { printf("%c",205); } // vertikale Linien for (yb= y+1; yb< y+ylen-1; yb++) { gotoxy(x,yb); printf("%c", 186); gotoxy(x+xlen-1,yb); printf("%c", 186); } // Eckpunkte gotoxy(x,y); printf("%c",201); // ╔ links oben gotoxy(x,y+ylen-1); printf("%c",200); // ╚ links unten gotoxy(x+xlen-1,y); printf("%c",187); // ╗ rechts oben gotoxy(x+xlen-1,y+ylen-1); printf("%c",188); // ╚ rechts unten // innere Trennlinie gotoxy(x,y+2); printf("%c",204); // ╠ Verzweigung innere Linie links gotoxy(x+xlen-1,y+2); printf("%c",185); // ╣ Verzweigung innere Linie rechts } int main(void) { settextattr(0x07); clrscr(); boxoutwhead(10,3,40,10, 0x2e, 0x70); settextattr(0x20); gotoxy(11,4); printf(" Hallo Welt "); settextattr(0x70); gotoxy(12,7); printf("Eine Textbox mit Rahmenzeichen"); gotoxy(12,8); printf("aus Codepage 850 im Linux Terminal"); settextattr(0x07); gotoxy(1,20); printf("\n\n"); }