1.1.1 User Interface

In a multitasking operating system, it is important to give all applications some portion of the screen so that the user can interact with all applications. Some systems do this by giving one program full use of the screen while other programs wait in the background. With Windows, every application has access to some part of the screen at all times by means of a window for user interaction. A window is a rectangle that provides a combination of useful visual devices, such as menus, controls, and scroll bars, with which the user controls an application.

In the standard MS-DOS environment, the system automatically prepares the screen for an application—typically, by passing a file handle to the application. The application can then use that file handle to send output to the screen by using conventional C run-time functions or MS-DOS function calls. In Windows, an application must create its own window before performing any output or receiving any input. Once the application creates a window, Windows provides the application with a great deal of information about what the user is doing with the window. Windows automatically performs many of the tasks the user requests, such as moving and sizing the window.

Another advantage to developing applications in Windows is that, in contrast to a standard C application, which has access to a single screen “surface,” a Windows application can create and use any number of overlapping windows to display information in any number of ways. Windows manages the screen, controls the placement and display of windows, and ensures that no two applications attempt to access the same part of the screen at the same time.