The subsystem of Microsoft Windows responsible for displaying graphics on video displays and printers is known as the Graphics Device Interface (GDI). As you might imagine, GDI is an extremely important part of Windows. Not only do the applications you write for Windows use GDI for the display of visual information, but Windows itself uses GDI for the visual display of user interface items such as menus, scroll bars, icons, and mouse cursors.
Unfortunately, a comprehensive discussion of GDI would require an entire book, and this is not that book. Instead, in this chapter I want to provide you with the basics of drawing lines and filled areas. This is enough GDI to get you through the next few chapters. In later chapters, we'll look at GDI support of bitmaps, metafiles, and formatted text.