The default coordinate system for a device context is simple. The upper-left corner of the client area is the origin, or the coordinates (0,0). Each pixel to the right represents one unit along the positive x-axis. Each pixel down represents one unit along the positive y-axis.
You can modify this coordinate system by changing the mapping mode and display origins. The mapping mode defines the coordinate-system units. The default mode is MM_TEXT, or one pixel per unit. You can also specify mapping modes that use inches or millimeters as units. The SetMapMode function changes the mapping mode for a device. You can move the origin of the coordinate system to any point by calling the SetViewportOrg function.
For simplicity, the examples in this chapter and throughout this guide use the default coordinate system.