1.6.1 How Windows Manages the Display

The system display is the principal display device for all applications running with Windows. All applications are free to display some form of output on the system display, but since many applications can run at one time, applications are not entitled to the entire system display. The complete system display must be shared. Windows shares the system display by carefully managing the access that applications have to it. Windows ensures that applications have space to display output but do not draw in the space reserved for other applications.

Windows manages the system display by using the display context type. The display context is a special device context that treats each window as a separate display surface. An application that retrieves a display context for a specific window has complete control of the system display within that window, but cannot access or paint over any part of the display outside the window. With a display context, an application can use GDI painting functions, as well as the output functions described in this section, to draw in the given window.