window

From RAD Studio
Jump to: navigation, search

Go Up to conio.h Index

Header File

conio.h

Category

Console I/O Routines

Prototype

void window(int left, int top, int right, int bottom);

Description

Defines active text mode window.

Note: Do not use this function in Win32 GUI applications.

window defines a text window onscreen. If the coordinates are in any way invalid, the call to window is ignored.

left and top are the screen coordinates of the upper left corner of the window.

right and bottom are the screen coordinates of the lower right corner.

The minimum size of the text window is one column by one line. The default window is full screen, with the coordinates:

1,1,C,R

where C is the number of columns in the current video mode, and R is the number of rows.

Return Value

None.

Example

#include <conio.h>
int main(void)
{
   window(10,10,40,11);
   textcolor(BLACK);
   textbackground(WHITE);
   cprintf("This is a test\r\n");
   return 0;
}

Portability

POSIX Win32 ANSI C ANSI C++

+